described Mancala variant in C++ in the pictures. Player 1 will be a human while the other will be a computer player. The computer player selects a hole following the following decision logic: If there is a hole with enough pieces to finish the turn in the computer player's end zone, select it. Otherwise select the hole on the right to left path with the greatest amount of marbles. If there are no marbles on that path then select the hole closest to the opponent's end zone. It is highly suggested, but not required, to pause the output after the computer makes a move to allow the user to interpret the output before more gets printed out. Look into cin.get(); The program should not allow the player to enter incorrect selections. The player cannot select a nonexistent hole, the end zones, or an empty hole. Look at the example output for an example for how to output the game board formatted in a nice way. You must tell the player what input is valid. For example, the example outputs show a board next to the game board showing how the bins are labeled. Implement at least 4 ADTs.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Problem Description:

Implement the described Mancala variant in C++ in the pictures. Player 1 will be a human while the other will be a computer player. The computer player selects a hole following the following decision logic: If there is a hole with enough pieces to finish the turn in the computer player's end zone, select it. Otherwise select the hole on the right to left path with the greatest amount of marbles. If there are no marbles on that path then select the hole closest to the opponent's end zone. It is highly suggested, but not required, to pause the output after the computer makes a move to allow the user to interpret the output before more gets printed out. Look into cin.get(); The program should not allow the player to enter incorrect selections. The player cannot select a nonexistent hole, the end zones, or an empty hole. Look at the example output for an example for how to output the game board formatted in a nice way. You must tell the player what input is valid. For example, the example outputs show a board next to the game board showing how the bins are labeled. Implement at least 4 ADTs.

Each square, except the end zones (the long rectangles ones on the sides of the board) start with
3 marbles inside of them. The end zones start empty. This is a two person game, and each person
has their own end zone. Player 1 has the end zone on the right and player 2 has the end zone on
the left. The goal is to get as many pieces into your end zone. Each player takes a turn to move
the marbles until a player's end zone has 5 marbles in it. Then the game is over. Once that
happens the marbles in the 4 right hand holes go into the right end zone, and the 4 on the left go
to the left end zone, leaving the middle square untouched. Once the pieces have been distributed
the winner is determined by who has the most marbles in their end zone.
On a player's turn they move by selecting any hole with marbles in it, except the end zones.
They pick up all the marbles in that hole and start traveling along the red path of movement
Transcribed Image Text:Each square, except the end zones (the long rectangles ones on the sides of the board) start with 3 marbles inside of them. The end zones start empty. This is a two person game, and each person has their own end zone. Player 1 has the end zone on the right and player 2 has the end zone on the left. The goal is to get as many pieces into your end zone. Each player takes a turn to move the marbles until a player's end zone has 5 marbles in it. Then the game is over. Once that happens the marbles in the 4 right hand holes go into the right end zone, and the 4 on the left go to the left end zone, leaving the middle square untouched. Once the pieces have been distributed the winner is determined by who has the most marbles in their end zone. On a player's turn they move by selecting any hole with marbles in it, except the end zones. They pick up all the marbles in that hole and start traveling along the red path of movement
dropping one marble in each hole they pass. The starting hole does not get a marble unless you
pass over it again. If the player goes over their opponent's end zone they skip over it without
dropping a marble; but if they pass their own end zone they will drop a marble in it. The turn
ends once the player has dropped all of the marbles they had in their hand. If the player finishes a
turn by dropping their last marble in their own end zone they get another turn.
Transcribed Image Text:dropping one marble in each hole they pass. The starting hole does not get a marble unless you pass over it again. If the player goes over their opponent's end zone they skip over it without dropping a marble; but if they pass their own end zone they will drop a marble in it. The turn ends once the player has dropped all of the marbles they had in their hand. If the player finishes a turn by dropping their last marble in their own end zone they get another turn.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY