Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. The program would allow 2 and up to 9 human players. Each game is played by the SAME number of players once it starts

image text in transcribedimage text in transcribed

1. The program would allow 2 and up to 9 human players. Each game is played by the SAME number of players once it starts 2. The program will capture player's full names (first name and last name separated by space(s)). A valid player's name consists of only alphabet letters. Players' names are entered one player at a time per line. 3. The first player's piece is "z", the second player's piece is "y", and so on. The ninth player's piece is "r". The players keep their pieces throughout the game. 4. The players can specify the size of the board (up to 12 by 16) for EACH game. The number of rows and columns are input on separate prompts. Each game might have a different board size. The minimum size of the board is 3 by 3. 5. Player with piece "z" starts the first game. The order of players will be in the round robin sequence "z"."r" and then back to "z". 6. The initial game board (example: 4 X 6) should exactly like the one below: Please enter the dimension of the board. Enter the number of rows -> 4 Enter the number of columns -> 6 2 3 4 5 6 1 IB IC ID 1 2 3 4 5 6 7. All players' names should be displayed in the format of starting with a capitalized letter and followed by lower case letters. 8. Only the first name of players is to be used in subsequent prompt messages (#9 below). However, the full name will be used in displaying game statistics (#14 below) 9. The program will prompt user's move accordingly using only the first name of the player 10. A player's move is specified as column number (1..16), followed by row character (A..L, or a...), a single entry, e.g. 5D, 12J, 46, 6d, etc. The row character can be upper case or lower case. 11. The program would redraw the board after each move. 12. A player wins the game if he has three of his pieces consecutively horizontally, vertically or diagonally anywhere in the board. 13. If one player wins, at least one of the possible winning configurations will be displayed on the board in upper case of his/her piece. 14. At the end of each game, the program would display the total number of games played and the number of games each player wins, loses and draws in a table form. The full names of the players are used in the statistic display and are aligned right. The number in the statistics also aligned right (assuming a maximum of 1000 games can be played any time. An example of such statistics is as below: Total game played = 1 WIN LOSS DRAW : John Doel 1 1 11 Jane Doe 1 Mary Elizabeth Unknown 15. If a game ends with someone winning, the next game starts with the player AFTER the winner of the previous game in the round robin sequence, i.e. the winner of the previous game will be the last one in the next game. 16. If a game ends in a draw, the next game starts with the players after the previous game starter in the round robin sequence. 17. The program would allow multiple games to be played until the players select to quit at the end of any game. 1. The program would allow 2 and up to 9 human players. Each game is played by the SAME number of players once it starts 2. The program will capture player's full names (first name and last name separated by space(s)). A valid player's name consists of only alphabet letters. Players' names are entered one player at a time per line. 3. The first player's piece is "z", the second player's piece is "y", and so on. The ninth player's piece is "r". The players keep their pieces throughout the game. 4. The players can specify the size of the board (up to 12 by 16) for EACH game. The number of rows and columns are input on separate prompts. Each game might have a different board size. The minimum size of the board is 3 by 3. 5. Player with piece "z" starts the first game. The order of players will be in the round robin sequence "z"."r" and then back to "z". 6. The initial game board (example: 4 X 6) should exactly like the one below: Please enter the dimension of the board. Enter the number of rows -> 4 Enter the number of columns -> 6 2 3 4 5 6 1 IB IC ID 1 2 3 4 5 6 7. All players' names should be displayed in the format of starting with a capitalized letter and followed by lower case letters. 8. Only the first name of players is to be used in subsequent prompt messages (#9 below). However, the full name will be used in displaying game statistics (#14 below) 9. The program will prompt user's move accordingly using only the first name of the player 10. A player's move is specified as column number (1..16), followed by row character (A..L, or a...), a single entry, e.g. 5D, 12J, 46, 6d, etc. The row character can be upper case or lower case. 11. The program would redraw the board after each move. 12. A player wins the game if he has three of his pieces consecutively horizontally, vertically or diagonally anywhere in the board. 13. If one player wins, at least one of the possible winning configurations will be displayed on the board in upper case of his/her piece. 14. At the end of each game, the program would display the total number of games played and the number of games each player wins, loses and draws in a table form. The full names of the players are used in the statistic display and are aligned right. The number in the statistics also aligned right (assuming a maximum of 1000 games can be played any time. An example of such statistics is as below: Total game played = 1 WIN LOSS DRAW : John Doel 1 1 11 Jane Doe 1 Mary Elizabeth Unknown 15. If a game ends with someone winning, the next game starts with the player AFTER the winner of the previous game in the round robin sequence, i.e. the winner of the previous game will be the last one in the next game. 16. If a game ends in a draw, the next game starts with the players after the previous game starter in the round robin sequence. 17. The program would allow multiple games to be played until the players select to quit at the end of any game

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions

Question

T F Recruiting is an activity of human resources acquisition.

Answered: 1 week ago

Question

=+Have you been dishonorably discharged from the military?

Answered: 1 week ago

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago