-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpawn.cpp
More file actions
29 lines (26 loc) · 832 Bytes
/
pawn.cpp
File metadata and controls
29 lines (26 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/***********************************************************************
* Source File:
* PAWN : Handles a pawn on the board
* Author:
* Austin Jesperson
* Summary:
* A pawn on the chess board.
************************************************************************/
#include "pawn.h"
/************************************************
* CONSTRUCTOR : Initializes a Pawn object
************************************************/
Pawn::Pawn(Position pos, bool color, PieceType pt)
{
position = pos;
fWhite = color;
type = pt;
canSlide = false;
}
/*************************************************
* DRAW : Draws the Pawn on the board
************************************************/
void Pawn::draw(ogstream& gout)
{
gout.drawPawn(position.getLocation(), fWhite);
}