Two Player Chess - Vhdl

Only available on StudyMode
  • Topic: Chess, Computer chess, Rules of chess
  • Pages : 5 (1186 words )
  • Download(s) : 104
  • Published : March 19, 2013
Open Document
Text Preview


Two-player Chess
By: Nishit S. Rao (10EC75), Nikhil Vashistha (10EC73),
Mohammed Anees (10EC64)

Digital systems design project

We would like to take this opportunity to extend our sincere gratitude to Mr. Kiran Kumar, who has been with us through difficult times in our labs. The help provided all semester had encouraged us to attempt a project of such magnitude. We would also like to thank Ms. Kalpana G Bhat, without whose intital efforts our project could not have been envisioned.

Page 1

Digital systems design project

Chess is a two-player board game played on a chessboard, a square checkered board with 64 squares arranged in an eight-by-eight grid. Each player begins the game with sixteen pieces: one king, one queen, two rooks, two knights, two bishops, and eight pawns. Each of the six piece types moves differently. Pieces are used to attack and capture the opponent's pieces, with the object of the game being to 'checkmate' the opponent's king by placing it under an inescapable threat of capture. In addition to checkmate, the game can be won by the voluntary resignation of one's opponent, which typically occurs when too much material is lost, or if checkmate appears unavoidable. A game may also result in a draw in several ways, where neither player wins. The 8x8 grid has a total of 64 squares alternately colored white or black. The columns are called files and the rows are called ranks. The files are labeled from a-h, while the ranks are numbered from 1-8. Each square of the chessboard is identified by a unique coordinate pair consisting of a file and a rank. Each type of piece (other than pawns) is identified by an uppercase letter, usually the first letter in the name of the piece in whatever language is spoken by the player recording. English-speaking players use K for king, Q for queen, R for rook, B for bishop, and N for knight (since K is already used). Each move of a piece is indicated by the piece's uppercase letter, plus the coordinate of the destination square. For example, Be5 (move a bishop to e5), Nf3 (move a knight to f3), c5 (move a pawn to c5—no piece letter in the case of pawn moves).

Page 2

Digital systems design project

Our project is a game of chess coded entirely in VHDL
A move is made by entering the details of the move through UART. The format of the input move is as follows: spacespace For example: 11 21 WP2 In the above example, the second white pawn (White Pawn 2) moves from the 2nd block from the right & left to the block directly above it, the numbering format being: space

Page 3

Digital systems design project

The project comprises the following other characteristics:
1. Move validation: Upon entering the input, an algorithm sets into motion wherein the code will analyze the move made and will decide if the move that is trying to be done is a valid one. 2. Turn switching: If the move is a valid one, the code will not allow that user to make another move until a valid one has been made by the opposition. 3. Capturing: If a piece of the opposition has been replaced from the block on which it was, the move is termed ‘capture’ and the captured piece is placed in a prison grid outside the board.

Page 4

Digital systems design project

1. Move validation:

Page 5

Digital systems design project

2. Piece capture

Page 6

Digital systems design project

We have succeeded in designing a chess program for two human players. The algorithm for the movement and capturing of pieces presented the greatest challenge and yet proved to be interesting. The deficiencies of the basic program lie in the display of the setup, the input of commands and checkchecking. We were unable to include this due to shortage of time during the End-Semester Exams. The rest of the program was very straight forward to implement, with only a few...
tracking img