@@ -0,0 +1,1668 @@
+import java.util.Random;%0A%0Aclass SnakesAndLadders extends Game %7B%0A%0A    /* Implementation of necessary concrete methods */%0A    void initializeGame() %7B%0A        // Initialize players%0A        playerPositions = new int%5BplayersCount%5D;%0A        for (int i = 0; i %3C playersCount; i++) %7B%0A           playerPositions%5Bi%5D = 0;%0A        %7D%0A%0A        die = new Random();%0A%0A        winnerId = -1;%0A    %7D%0A%0A    void makePlay(int player) %7B%0A        // Roll the die%0A        int dieRoll = die.nextInt(6) + 1;%0A%0A        // Move the token%0A        playerPositions%5Bplayer%5D += dieRoll;%0A%0A        // Move up or down because of the ladders or the snakes%0A        int penaltyOrBonus = board%5BplayerPositions%5Bplayer%5D%5D;%0A        playerPositions%5Bplayer%5D += penaltyOrBonus;%0A%0A        if (playerPositions%5Bplayer%5D %3E 8) %7B%0A           // Has reached the top square%0A           winnerId = player;%0A        %7D%0A    %7D%0A%0A    boolean endOfGame() %7B%0A        // The game is over when a winner exists%0A        return (winnerId != -1);%0A    %7D%0A%0A    void printWinner() %7B%0A        System.out.println(%22Player #%22 + winnerId + %22 has won!%22);%0A    %7D%0A%0A    /* Specific declarations for the Snakes and Ladders game. */%0A%0A    // The board from the bottom square to the top square%0A    // Each integer is a square%0A    // Negative values are snake heads with their lengths%0A    // Positive values are ladder bottoms with their heights%0A    private static final int%5B%5D board = %7B0, 0, -1, 0, 3, 0, 0, 0, -5, 0%7D;%0A%0A    // The player positions%0A    // Each integer represents one player%0A    // The integer is the position of the player (index) on the board%0A    private int%5B%5D playerPositions = null;%0A%0A    private Random die = null;%0A%0A    private int winnerId = -1;%0A%7D%0A

Create SnakesAndLadders.java