-
Notifications
You must be signed in to change notification settings - Fork 0
/
Queen.cpp
44 lines (36 loc) · 826 Bytes
/
Queen.cpp
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// Queen.cpp for ChessIA in /home/wilmot_p/PROG/C++/ChessIA
//
// Made by WILMOT Pierre
// Login <[email protected]>
//
// Started on Tue Nov 27 00:32:41 2012 WILMOT Pierre
//
#include <iostream>
#include "Queen.hpp"
Queen::Queen(int x, int y, GameData::team t)
: PieceInfo(x, y, t, GameData::Queen)
{
m_name = "Queen";
m_directionsNb = 8;
m_directions[0][0] = 1;
m_directions[0][1] = 1;
m_directions[1][0] = 1;
m_directions[1][1] = -1;
m_directions[2][0] = -1;
m_directions[2][1] = 1;
m_directions[3][0] = -1;
m_directions[3][1] = -1;
m_directions[4][0] = 1;
m_directions[4][1] = 0;
m_directions[5][0] = -1;
m_directions[5][1] = 0;
m_directions[6][0] = 0;
m_directions[6][1] = 1;
m_directions[7][0] = 0;
m_directions[7][1] = -1;
m_moveRange = 8;
}
Queen::~Queen()
{
}