Question
Background: The board game Six Mens Morris is a two person strategy game that dates back to before 1400 B.C. The board is made up
Background: The board game Six Mens Morris is a two person strategy game that dates back to before 1400 B.C. The board is made up of two concentric squares containing 16 positions connected by lines
This project will have you implementing a modified version of Six Mens Morris. The rules for the modified version are explained below. You do not need to have any previous knowledge of the game.
Each player gets 6 red or 6 black pieces. The game has two phases. In the first phase, players take turns laying a piece down on a vacant point. If a player creates a string of three of their pieces on one line, they immediately remove one of the opponents pieces. The piece removed must be within 2 positions of the one just placed.
If red player just completed a string by placing a piece in position 1, while positions 14 and 7 already contained red pieces, then red player could remove a black piece from positions up to 2 spaces away. So they would be able to remove a black piece in positions 2,3,5,7,8, or 14.
In the second phase, the players have run out of pieces to play on the board. Instead of laying a piece down the player moves one of their pieces already on the board. Movement must be from one position to another position that is connected by a line. A piece can only move to an empty position that is one link away.
To win, a player must block their opponent from being able to make any moves or take all but two of the opponents pieces.
Problem Description: You are to implement the previously described game for 2 human players. The game should not allow the player to make an incorrect move. You will need to include 3 ADTs; one for a player, one for a game board, and one for a game board position.
Extra Help: You are given a function to print out the board in print.txt. This function has been modified from its original form to hide the structure of the game board and instead to handle an array of chars. You are encouraged to modify this function to suit your needs.
You will need to copy the function from the text file, modify it to match your program structure, and place it in your code.
Grading:
Compilation :15
Correct Output
o Correct placement of pieces 10
o Correct moving of pieces 10
o Correct removal of pieces 10
o Correct game ending 5
o Correct turn taking 5
Appropriate ADTs
o 3 ADTs 15
o All data members private 10
Use of Member Functions 15
Style: Comments, Indentation, Simplicity of Main 5
TOTAL 100
Penalties: ? Global Variables -10 ? Includeing .cpp files in another .cpp file -10
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started