The Pedigree Project
0.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
user
applications
chess
Square.h
1
/*
2
*
3
* Copyright (c) 2008-2014, Pedigree Developers
4
*
5
* Please see the CONTRIB file in the root of the source tree for a full
6
* list of contributors.
7
*
8
* Permission to use, copy, modify, and distribute this software for any
9
* purpose with or without fee is hereby granted, provided that the above
10
* copyright notice and this permission notice appear in all copies.
11
*
12
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19
*/
20
21
#ifndef SQUARE_H
22
#define SQUARE_H
23
24
class
Square
25
{
26
public
:
27
Square
() :
28
col(-1), row(-1)
29
{}
30
31
Square
(
int
col,
int
row) :
32
col(col), row(row)
33
{}
34
35
~
Square
() {}
36
37
void
rotate180()
38
{
39
col = 7-col;
40
row = 7-row;
41
}
42
43
bool
invalid()
44
{
45
return
(col == -1 && row == -1);
46
}
47
48
char
col, row;
49
};
50
51
#endif
Square
Definition:
Square.h:24
Generated on Fri Jan 24 2020 06:49:08 for The Pedigree Project by
1.8.11