ODD CLUSTERS Using C++ programming
The objective of this project is to write an interactive Odd Clusters game, using the programming knowledge you have gained this semester. Your task is to write a programthat allows one player to play a game of Odd Clusters against the computer or for twoindividuals to play against each other.
BASIC RULES OF ODD CLUSTERS
Odd Clusters is a board game played between two players, who alternatepiece placement on a square board, with sixty-four smaller squares, arrangedin an 8×8 grid. The players take turns. A turn consists of placing one piece onthe board in an unoccupied square.
A cluster is a grouping of one playerâ€™s pieces connected by adjacency. Thesmallest cluster is a single piece. An Odd Cluster is one composed of an oddnumber of pieces. If a piece placement creates a cluster of an even numberof pieces (an even cluster), the entire even cluster is cleared (the boardlocations are emptied). A player may have any number of Odd Clusters on theboard. Play ends when the board is completely full of pieces or the playersagree to end the game. The winner is the player with the most pieces on theboard at the end of the game.
â€¢ User interface â€“ the player shall be able to:
o Place a pieceo Resign from the game (quit)
â€¢ allow valid placement only (canâ€™t place a piece on an occupied location)â€¢ clear even clusters after notifying the participants that one has beenconstructed
â€¢ redisplay the game board after each moveâ€¢ handle computerâ€™s turn â€¢ determine that game is over if board is completely fullâ€¢ determine the winner at gameâ€™s conclusion and congratulate the winnerâ€¢ allow user to select who makes first move of game (user or computer)â€¢ allow user to save current game for future continuationâ€¢ allow user to reload an existing game to continue playingâ€¢ allow for two player mode (computer only checks for validity and removeseven clusters) in addition to one player/ computer mode
â€¢ computer piece placement should be done using randomizationâ€¢ you must employ functions (minimally 8) in both your design and code. Yourmain function should be looked upon as a driver function â€“ mainly makingfunction calls to specific modules.â€¢ The program must contain comments andâ€¢ Each function and the program need to have comment headers
â€¢ NO GLOBAL VARIABLES SHOULD BE USEDâ€¢ You may have two global constants â€“ for board rows, cols.
The remainder of the semester will be spent on this project. Time will be devoted todiscussing the mandatory components of the project. Some time will also be allocatedfor general program design discussion and/or examples. The final project will consist ofdesign, algorithm, code and testing components.