Help Write This Simple Checkers Code Game

Posted Under: Programming

Ask A Question
DESCRIPTION
Posted
Modified
Viewed 21
simple JAVA code will state on file. look at the file attached for detail its a checkers game code on the java console. nothing fancy like gui ,,,,,,,,,,

This order does not have tags, yet.

Attachments
Aim of the game: is to capture all the opponent’s pieces or render them unable to move. How the game ends: • The first player to lose all of his or her pieces loses the game. ---------------------------------------------------------------------------------------------------- 1. Folder called core containing CheckersLogic.java (Game Logic Module) 2. Folder called ui containing CheckersTextConsole.java (Console-based UI to play game) Reference: https://simple.wikipedia.org/wiki/Checkers ---------------------------------------------------------------------------------------------------- Program; . In this first version build it as a simple console-based game played by 2 players – Player X and Player O. Ensure that following: • Create 2 packages core and ui. • Create a separate class for the game logic called CheckersLogic.java and place it in core package • Create a separate class for the text-based UI called CheckersTextConsole.java and place it in ui package Create a simple console-based UI as shown in the figures below. • When the game starts, indicate that it is Player X’s turn. Ask the player to choose a piece to move by indicating the cell# followed by the new position, e,g, 3a-4b. • Check if the move is valid. If valid move, then show the state of the grid by placing the piece in the correct position (after capturing opponent piece, where applicable). Next check for “WIN/LOSE” state (i.e., if one of the players has no pieces left, or if one of the players is unable to make any legal move). Continue the game if valid moves are possible. • Next, indicate that it is Player O’s turn. Ask the player to choose a piece to move by indicating the cell# followed by the new position, e.g., 3a-4b. • A player wins the game when the opponent cannot make a move. This could be the case because all of the opponent's pieces have been captured or because all of opponent’s pieces are blocked in. • Only allow moving forward. • You don’t have to implement ‘Kinging’ or ‘Crowning’ or ‘Double piece’ features. 8 | _ | o | _ | o | _ | o | _ | o | 7 | o | _ | o | _ | o | _ | o | _ | 6 | _ | o | _ | o | _ | o | _ | o | 5 | _ | _ | _ | _ | _ | _ | _ | _ | 4 | _ | _ | _ | _ | _ | _ | _ | _ | 3 | x | _ | x | _ | x | _ | x | _ | 2 | _ | x | _ | x | _ | x | _ | x | 1 | x | _ | x | _ | x | _ | x | _ | a b c d e f g h Begin Game. Player X – your turn. Choose a cell position of piece to be moved and the new position. e.g., 3a-4b 3g-4h 8 | _ | o | _ | o | _ | o | _ | o | 7 | o | _ | o | _ | o | _ | o | _ | 6 | _ | o | _ | o | _ | o | _ | o | 5 | _ | _ | _ | _ | _ | _ | _ | _ | 4 | _ | _ | _ | _ | _ | _ | _ | x | 3 | x | _ | x | _ | x | _ | _ | _ | 2 | _ | x | _ | x | _ | x | _ | _ | 1 | x | _ | x | _ | x | _ | x | _ | a b c d e f g h PlayerO – your turn. Choose a cell position of piece to be moved and the new position. e.g., 3a-4b 6f-5e 8 | _ | o | _ | o | _ | o | _ | o | 7 | o | _ | o | _ | o | _ | o | _ | 6 | _ | o | _ | o | _ | _ | _ | o | 5 | _ | _ | _ | _ | o | _ | _ | _ | 4 | _ | _ | _ | _ | _ | _ | _ | x | 3 | x | _ | x | _ | x | _ | _ | _ | 2 | _ | x | _ | x | _ | x | _ | _ | 1 | x | _ | x | _ | x | _ | x | _ | a b c d e f g h . . 8 | _ | _ | _ | _ | _ | x | _ | _ | 7 | _ | _ | _ | _ | _ | _ | _ | _ | 6 | _ | _ | _ | _ | _ | _ | _ | x | 5 | _ | _ | _ | _ | _ | _ | _ | _ | 4 | _ | _ | _ | _ | _ | _ | _ | _ | 3 | x | _ | _ | _ | _ | _ | _ | _ | 2 | _ | _ | _ | _ | _ | x | _ | _ | 1 | _ | _ | _ | _ | _ | _ | _ | _ | a b c d e f g h Player X Won the Game Or 8 | _ | _ | _ | _ | _ | x | _ | _ | 7 | _ | _ | _ | _ | _ | _ | _ | _ | 6 | _ | _ | _ | _ | _ | _ | _ | x | 5 | _ | x | _ | _ | _ | _ | _ | _ | 4 | _ | _ | _ | _ | _ | _ | _ | _ | 3 | _ | _ | _ | _ | _ | _ | _ | _ | 2 | _ | o | _ | _ | _ | x | _ | _ | 1 | _ | _ |o | _ | o | _ | _ | _ | a b c d e f g h Player X Won the Game
Explanations and Answers 0

No answers posted

Post your Answer - free or at a fee

Login to your tutor account to post an answer

Posting a free answer earns you +20 points.

Login

NB: Post a homework question for free and get answers - free or paid homework help.

Get answers to: Help Write This Simple Checkers Code Game or similar questions only at Tutlance.

Related Questions