Please help. Introduction This particular program implements a game called “Checkers” that is played in real life. For this assignment, you should try to make your program look as nice as possible using the provided code fragment. This assignment will not be demoed. TAs will grade on their own during final’s week!!! Problem statement: Write a C++ program that plays the game of Checkers. Set Up: • Two players, one uses “x”s, the other uses “o”s. • Checkers may be played on an 8x8, 10x10 or 12x12 square board. • Command line arguments will be used to indicate the size of the board, for example: ./checkers 8 • No matter the size of the board, pieces are placed on the dark squares of the board, leaving the middle two rows blank. For example: How to Play (Game rules): • Players cannot move an opponent’s piece. • Turns alternate between players until the game is won. • The player who runs out of pieces first or cannot make a valid move loses the game. • Pieces may only move diagonally into unoccupied squares and only by one square if they are not capturing a piece. • A piece may capture opponent’s pieces by jumping over them diagonally. So long as there are successive pieces to be captured, the piece may continue moving. The line the piece travels does not have to be straight along one diagonal, it may change directions so long as it continues to progress the board and capture pieces. • When a piece has reached the King’s Row (furthest row from it’s originating side) then it is “kinged” by placing a second token on top of it (You may use “X”s or “O”s or any other distinguishable symbols to indicate “kinged” pieces). This piece is now permitted to move backwards on the board and allowed to capture backward. Implementation Requirements: • Establish the size of the board via command line arguments, must include error handling for too many and too few arguments as well as incorrect input. If an invalid size is provided, then the program should display a message to indicate the problem, and recover by asking for the size during runtime. • The board must be created using two-dimensional, dynamic memory. • The board must be correctly colored black and white using the following code as a base. The following code fragment colors a two-dimensional board. It is expected that you will adjust it as needed to provide the best user interface possible for your program. for (int i=0; i -No
Please help. Introduction This particular program implements a game called “Checkers” that is played in real life. For this assignment, you should try to make your program look as nice as possible using the provided code fragment. This assignment will not be demoed. TAs will grade on their own during final’s week!!! Problem statement: Write a C++ program that plays the game of Checkers. Set Up: • Two players, one uses “x”s, the other uses “o”s. • Checkers may be played on an 8x8, 10x10 or 12x12 square board. • Command line arguments will be used to indicate the size of the board, for example: ./checkers 8 • No matter the size of the board, pieces are placed on the dark squares of the board, leaving the middle two rows blank. For example: How to Play (Game rules): • Players cannot move an opponent’s piece. • Turns alternate between players until the game is won. • The player who runs out of pieces first or cannot make a valid move loses the game. • Pieces may only move diagonally into unoccupied squares and only by one square if they are not capturing a piece. • A piece may capture opponent’s pieces by jumping over them diagonally. So long as there are successive pieces to be captured, the piece may continue moving. The line the piece travels does not have to be straight along one diagonal, it may change directions so long as it continues to progress the board and capture pieces. • When a piece has reached the King’s Row (furthest row from it’s originating side) then it is “kinged” by placing a second token on top of it (You may use “X”s or “O”s or any other distinguishable symbols to indicate “kinged” pieces). This piece is now permitted to move backwards on the board and allowed to capture backward. Implementation Requirements: • Establish the size of the board via command line arguments, must include error handling for too many and too few arguments as well as incorrect input. If an invalid size is provided, then the program should display a message to indicate the problem, and recover by asking for the size during runtime. • The board must be created using two-dimensional, dynamic memory. • The board must be correctly colored black and white using the following code as a base. The following code fragment colors a two-dimensional board. It is expected that you will adjust it as needed to provide the best user interface possible for your program. for (int i=0; i -No
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Please help.
Introduction
This particular program implements a game called “Checkers” that is played in real life. For this assignment, you should try to make your program look as nice as possible using the provided code fragment.
This assignment will not be demoed. TAs will grade on their own during final’s week!!!
Problem statement:
Write a C++ program that plays the game of Checkers.
Set Up:
• Two players, one uses “x”s, the other uses “o”s.
• Checkers may be played on an 8x8, 10x10 or 12x12 square board.
• Command line arguments will be used to indicate the size of the board, for
example: ./checkers 8
• No matter the size of the board, pieces are placed on the dark squares of the board, leaving the
middle two rows blank. For example:
How to Play (Game rules):
• Players cannot move an opponent’s piece.
• Turns alternate between players until the game is won.
• The player who runs out of pieces first or cannot make a valid move loses the game.
• Pieces may only move diagonally into unoccupied squares and only by one square if they are
not capturing a piece.
• A piece may capture opponent’s pieces by jumping over them diagonally. So long as there are
successive pieces to be captured, the piece may continue moving. The line the piece travels does not have to be straight along one diagonal, it may change directions so long as it continues to progress the board and capture pieces.
• When a piece has reached the King’s Row (furthest row from it’s originating side) then it is “kinged” by placing a second token on top of it (You may use “X”s or “O”s or any other distinguishable symbols to indicate “kinged” pieces). This piece is now permitted to move backwards on the board and allowed to capture backward.
Implementation Requirements:
• Establish the size of the board via command line arguments, must include error handling for
too many and too few arguments as well as incorrect input. If an invalid size is provided, then the program should display a message to indicate the problem, and recover by asking for the size during runtime.
• The board must be created using two-dimensional, dynamic memory.
• The board must be correctly colored black and white using the following code as a base. The following code fragment colors a two-dimensional board. It is expected that you will adjust it as needed to provide the best user interface possible for your program.
for (int i=0; i
-No
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education