TEXT BASED CHESS GAME IN C
The project ‘DESIGNING OF TEXT BASED CHESS GAME USING
COMPUTER GRAPHICS’ implements a classic version of Chess with
the help of GRAPHICAL USER INTERFACE(GUI).
The Chess game follows the basic rules of chess, and all the
chess pieces only move according to valid moves for that piece. This
project is a “ 2D GAME”, it is is programmed using c.
Standard Definitions:
Chess Board: A board you need to play Chess. Have 64 black and white
square.
Chess: A game played by 2 people on a chessboard with 16 pieces
each.
Pawn(P): One of eight men of one color and of the lowest value
usually moved one square at a time vertically and capturing
diagonally.
King(K): The main piece of the game, checkmating this piece is the
object of the game. It can move 1 space in any direction.
Knight(H): This piece can move 1 space vertically and 2 spaces
horizontally or 2 spaces vertically and 1 space horizontally. This piece
looks like a horse. This piece can also jump over other pieces.
Queen(Q): This piece can move in any number of spaces in any
direction as long as no other piece is in its way.
1
Rook(R): one of two pieces of the same color that may be
moved any number squares horizontally or vertically, as long as no
other piece blocks its way.
Bishop(C): one of two pieces of the same color that may be moved
any number squares diagonally, as long as no other piece blocks its
way.
Text-Based Chess Game
Text-based games are an excellent way to introduce students to
programming concepts and encourage them to think algorithmically.
Chess, with its well-defined rules and complexity, is an ideal candidate
for such a project.
The text-based game uses upper and lowercase letters for the chess
pieces for players 1 and 2 respectively. The blank pieces are indicated
with a '-' and there is a number grid provided for easier input of the
coordinates of squares. The player is prompted to input the
coordinates of the piece to be moved, and where to move it. We
decided that because chess is a complicated game with many rules,
we would not be able to implement all its functionality. Starting with
testing the simpler functions and gradually working up to playing
chess matches, we tested the text-based version for functionality.
Designing and debugging the text-basedversion was challenging