Getting Ready: The Chess Game
Understand the chess game problem and learn the questions to further simplify this problem.
Problem definition
Chess is a board game for two players that involves strategy and is played on a checkered board made up of 64 squares in an 8x8 grid. Each player starts with 16 pieces, including a king, queen, two rooks, two knights, two bishops, and eight pawns. The goal is to checkmate the opponent's king. This occurs when the king is in a position to be captured (check), and there is no way to move the king out of capture (checkmate).
Each piece has its own unique movements. The rook can move horizontally or vertically, the knight can move in an L-shape position, the bishop can move diagonally, the queen can move in any direction, and the king can move one square in any direction. Pawns have the most complex movement rules and can move forward one square but capture diagonally.
The game can also end in a draw if the king is not in checkmate, and it is not possible for either player to force a win. A draw happens if there are not enough pieces on the board to force a checkmate (except the two kings), the same position is repeated three times, or both the players agree to a draw.
Note: There are numerous variations of the game of chess that are played globally. In this design problem, we'll focus on creating a digital version of the two-player chess game that can be played online.
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy