summaryrefslogtreecommitdiffstats
path: root/knights/board_base.cpp
blob: ce63e56445ac96a6fd1236ec41b42036f2072f39 (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/***************************************************************************
                          board_base.cpp  -  description
                             -------------------
    begin                : Fri Feb 28 2003
    copyright            : (C) 2003 by The Knights Team
    email                : knights-general@lists.sourceforge.net
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include "board_base.moc"
#include "resource.h"
#include "logic.h"

board_base::board_base(TQWidget *parent, const char *name, resource *Rsrc, logic *Lgc ) : TQWidget(parent,name)
{
	/* Setup Variables */
	myResource = Rsrc;
	myLogic = Lgc;

	paused = false;
	flip = false;
	localArmy = WHITE;
}
board_base::~board_base()
{
}
///////////////////////////////////////
//
//	board_base::setPaused
//
///////////////////////////////////////
void board_base::setPaused( const bool &state )
{
	paused = state;
	redrawAll();
}
///////////////////////////////////////
//
//	board_base::setLocalArmy
//
///////////////////////////////////////
void board_base::setLocalArmy( const bool &state )
{
	if( state == localArmy )
		return;
	localArmy = state;
	redrawAll();
}
///////////////////////////////////////
//
//	board_base::flipBoard
//
///////////////////////////////////////
void board_base::flipBoard( void )
{
	flip = !flip;
	redrawAll();
}
///////////////////////////////////////
//
//	board_base::drawMove
//
///////////////////////////////////////
void board_base::drawMove( const ChessMove&, const bool& )
{
	/* Subclasses MUST reimplement this */
}
///////////////////////////////////////
//
//  board_base::resizeBoard
//
///////////////////////////////////////
void board_base::resizeBoard( void )
{
	/* Subclasses MUST reimplement this */
}
///////////////////////////////////////
//
//	board_base::redrawAll
//
///////////////////////////////////////
void board_base::redrawAll( void )
{
	/* Subclasses MUST reimplement this */
}
///////////////////////////////////////
//
//	board_base::drawPosition
//
///////////////////////////////////////
void board_base::drawPosition( const int& )
{
}
///////////////////////////////////////
//
//	board_base::setPremovePositions
//
///////////////////////////////////////
void board_base::setPremovePositions( const int&, const int& )
{
}
///////////////////////////////////////
//
//	board_base::commit
//
///////////////////////////////////////
void board_base::commit( void )
{
}
///////////////////////////////////////
//
//	board_base::redrawLights
//
///////////////////////////////////////
void board_base::redrawLights( void )
{
}