git.ucc.asn.au
/
progcomp2012.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reduced of moves before DRAW_DEFAULT
[progcomp2012.git]
/
judge
/
manager
/
stratego.h
diff --git
a/judge/manager/stratego.h
b/judge/manager/stratego.h
index
d2e667f
..
46d10fa
100644
(file)
--- a/
judge/manager/stratego.h
+++ b/
judge/manager/stratego.h
@@
-28,6
+28,9
@@
class Piece
typedef enum {RED=0, BLUE=1, NONE=2, BOTH=3} Colour; //Used for the allegiance of the pieces - terrain counts as NONE.
typedef enum {RED=0, BLUE=1, NONE=2, BOTH=3} Colour; //Used for the allegiance of the pieces - terrain counts as NONE.
+ static Colour OppositeColour(const Colour & compare);
+
+
Piece(const Type & newType, const Colour & newColour) : type(newType), colour(newColour), beenRevealed(false) {}
virtual ~Piece() {}
Piece(const Type & newType, const Colour & newColour) : type(newType), colour(newColour), beenRevealed(false) {}
virtual ~Piece() {}
@@
-73,10
+76,14
@@
class Piece
switch (colour)
{
case RED:
switch (colour)
{
case RED:
- return Graphics::Colour(1
,0,0
);
+ return Graphics::Colour(1
.0,0.5,0.5
);
break;
case BLUE:
break;
case BLUE:
- return Graphics::Colour(0,0,1);
+ #ifdef __MACOSX__ //Horrible HACK to make pieces green on Mac OSX, because Blue doesn't exist on this operating system.
+ return Graphics::Colour(0,1.0,0);
+ #else
+ return Graphics::Colour(0.5,0.5,1.0);
+ #endif //__MACOSX__
break;
case NONE:
return Graphics::Colour(0.5,0.5,0.5);
break;
case NONE:
return Graphics::Colour(0.5,0.5,0.5);
@@
-106,7
+113,7
@@
class Board
virtual ~Board(); //Destructor
void Print(FILE * stream, const Piece::Colour & reveal=Piece::BOTH); //Print board
virtual ~Board(); //Destructor
void Print(FILE * stream, const Piece::Colour & reveal=Piece::BOTH); //Print board
- void PrintPretty(FILE * stream, const Piece::Colour & reveal=Piece::BOTH); //Print board using colour
+ void PrintPretty(FILE * stream, const Piece::Colour & reveal=Piece::BOTH
, bool showRevealed=true
); //Print board using colour
#ifdef BUILD_GRAPHICS
void Draw(const Piece::Colour & reveal=Piece::BOTH, bool showRevealed = true); //Draw board
#ifdef BUILD_GRAPHICS
void Draw(const Piece::Colour & reveal=Piece::BOTH, bool showRevealed = true); //Draw board
UCC
git Repository :: git.ucc.asn.au