Professional Documents
Culture Documents
Project
Submitted to -
Ms. Sarishty Gupta
Submitted by -
Akshay Nagar ( 2014UCP1524 )
Manish Patki ( 2014UCP1550 )
1
Index
1 Introduction 3
2 Modules Implemented 4
3 Development Model 5
4 Design 6
5 Implementation Details 10
2
Introduction
This project basically consists implementation of a 2 player chess
game. The basic objective a Chess game is to capture the Enemy
King. It consists of an 8x8 square board, with alternate black and
white boxes. There are 2 players, one black and other white, and
each player has certain type of pieces, namely King, Queen, Bishop,
Rook, Knight and Pawns.
Tools used –
C++
OpenGL
3
Modules implemented:
The game is divided into 2 main modules
4
Development model – Prototype
Phase 1
Initially we developed a prototype of the game.
The prototype implemented the basic game logic and used
simple graphics.
Phase 2
Special cases like the En Passant rule, Castling, Pawn
Promotion, Checkmate and Stalemate, Fork during En Passant
were implemented in this phase.
5
Design
DFD level 0 :
DFD level 1 :
6
Flowchart
7
Flowchart (contd.)
8
Flowchart (contd.)
9
Implementation Details
The following part contains code snippets, and inner specific
implementation details.
1) Class details.
10
The above snippet shows that the class Queen is Multiply
Inherited from the class .
11
2) Checkmate details
12
Case 3 – Path intervention by other player
13
When all the 3 check flags are set, then Checkmate condition
occurs.
3) Stalemate code
14
Output for test cases
15
2) Illegal move.
16
3) General Checkmate condition
17
4) Pawn promotion.
18