main |
WarGame |
Player |
Deck |
Pile |
Card
The following is the script for the master of ceremonies for a simulation of
a game of war simplified to use only 20 cards. Scripts for the objects
involved in the game are given on the pages linked to above.
- create a new game
- do the following until otherwise specified
- tell game to "playTurn"
- ask game to "checkGameOver"
- if answer was "yes" then stop
- ask game "getWinner"
- if answer was "no one" then announce "Draw",
- otherwise tell winner "doVictoryDance"