Computer Assignement Giki
Computer Assignement Giki
Checkers is a board game played between two players, who alternate moves. The player who
cannot move, because he has no pieces, or because all of his pieces are blocked, loses the game.
Players can resign or agree to draws.
The starting position is with each player having twelve pieces, on the
twelve dark squares closest to his edge of the board. Notice that in
checker diagrams, the pieces are usually placed on the light colored
squares, for readability. On a real board they are on the dark squares.
Jumping: You capture an opponent's piece (piece or king) by jumping over it,
diagonally, to the adjacent vacant square beyond it. The three squares must be
lined up (diagonally adjacent) as in the diagram at the left: your jumping piece
(piece or king), opponent's piece (piece or king), empty square. A king can jump
diagonally, forward or backward. A piece which is not a king, can only jump diagonally
forward. You can make a multiple jump (see the diagram on the right), with one piece only, by
jumping to empty square to empty square. In a multiple jump, the jumping piece or king can
change directions, jumping first in one direction and then in another direction. You can only
jump one piece with any given jump, but you can jump several pieces with a move of several
jumps. You remove the jumped pieces from the board. You cannot jump your own piece. You
cannot jump the same piece twice, in the same move. If you can jump, you must. And, a multiple
jump must be completed; you cannot stop part way through a multiple jump. If you have a choice
of jumps, you can choose among them, regardless of whether some of them are multiple, or not.
A piece, whether it is a king or not, can jump a king.
Kinging: When a piece reaches the last row (the King Row), it becomes a King. A second
checker is placed on top of that one, by the opponent. A piece that has just kinged, cannot
continue jumping pieces, until the next move.
Red moves first. The players take turns moving. You can make only one move per turn. You
must move. If you cannot move, you lose. Players normally choose colors at random, and then
alternate colors in subsequent games
Constraints:
Must use classes
Each piece on the board must be an instance of a Class called Piece
The class Piece may contain attributes
o Player
o LocationX
o LocationY
o IsKing
o ……..
The class Piece may contain functions.
o TakeMove
o ValidateMove
o …..(any additional function as you may need)
Display the game board as a 2D array.
Check all the valid and invalid moves
Assignment Submission