This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Structs, Enums, and Arrays, Oh My! EECS 280 -- Winter 2009 Out: Tuesday, February 10th Due: 11:59 PM, Thursday, March 12th I. Introduction Sorry! is a Parker Brothers board game of the "move from start to home" genre, incorporating both random chance and strategy. Players draw cards which specify possible movement---but, often the player has a choice about how to use that move. The method one uses to make those choices is called a "strategy". In this project, you will write a simulator incorporating a simplified version of the game, along with a particular strategy. In the course of building this simulator, you will use some of C++'s I/O mechanisms and will gain experience using enumerations, structures, and arrays. II. Sorry --- Rules of Movement The official Sorry board has 60 squares and one deck of 45 cards. Up to four players can play. Each player has four pawns. Note: this version of the game differs slightly from the "official" game. We have done this both to simplify the project, as well as to generalize it. When the rules differ, these specifications should be followed. Each player also has a special "start square" and "home square" on the board. All pawns start the game "off the board." Each player's objective is to move each of his pawns from "off-board" onto the start square, around the board, and directly to the home square. The cards govern movement. In our version of the game, there are the following types of cards. Some card types also have a "value" associated with them. * Start: Move a pawn onto your start square if possible. * Forward: Move a pawn forward "value" spaces. * Backward: Move a pawn backward "value" spaces. * Swap: Switch any one of your pawns with any of your opponents'. You may only switch places between two pawns that are both "on the board", not those waiting to start or those that have already reached home. * Sorry: Take one of your pawns not yet on the board (if any), and place it on a square occupied by any opponent pawn, sending that pawn off the board. The "bumped" pawn must start again. You may "jump" over a pawn of any color, counting it as a space. If a move would end on a square already occupied by a pawn of your own color, you may not take it. If a move would end on a square already occupied by a pawn of another color, you may take it---in addition, the landed-upon pawn is sent "off board", and must start again. You may not move forward past your "home square"---you must land on it exactly. However, you may move backward past your home square---this is very advantageous to you, as it shortens your path considerably. If you draw a card, and no move is possible, you forfiet your turn. However, if one or more moves are possible, you must take one of them, even if all of them leave you at a disadvantage....
View Full Document
- Spring '08
- Playing card, Square number, pawn, home square