Object-Z (or TCOZ) Specification of the
Checkers Game
Requirements (Rules of the Game):
Checkers is played on a board of 64 squares.
One player has red pieces, one has white pieces.
Red always moves first, and you alternate turns for the rest of the game.
You are the winner of the game if you has successfully blocked your opponent
from moving, or has taken all of his pieces from the board, or your
opponent resigns.
The final project will be assessed for
- completeness (10 marks)
- correctness (10 marks)
- structure/clarity (10 marks)
- Innovative modeling/discussion/presentation (10 marks)
Here are the information from MS Windows Checker Game help manual:
At the beginning of the game,
a piece must move forward into an unoccupied space, either by moving
diagonally one space or by jumping an opponent's piece.
When a piece reaches the far side of the board,
it is crowned and can then move diagonally forward or backward.
You can capture your opponent's pieces by jumping them.
To jump, your piece must be next to your opponent's piece,
and there must be an empty space directly on the other side
of your opponent's piece. In other words, you must jump over
your opponent's piece and still have a place to land on the other side.
After you've jumped a piece, the piece you jumped over disappears from the board.
If a jump is available to you, you must take it.
The Checkers game will not let you make any other move if a jump is available.
This also applies to multiple jumps. To move your piece during a multiple jump,
you cannot drag your piece directly to the final square.
You must jump one piece at a time until you cannot jump any more.
If your piece reaches all the way to the far edge of the board
(where your opponent started the game), that piece becomes a king.
Kings can move backward as well as forward.
When you ask for a draw, you are offering your opponent a tie game
where neither player wins. Your opponent has the opportunity to accept or
decline your offer.
If your opponent accepts your draw, the game ends and a
"Draw" message shows on the screen.
If your opponent refuses your draw, you will see a message
telling you that the draw has been refused, and the game will continue.
When you resign, the game ends and your opponent wins. Unlike offering a draw,
there are no chances for your opponent to either accept or decline your resignation.