diff --git a/judge/manager/stratego.cpp b/judge/manager/stratego.cpp index 7894378e01981ff103023646e2b4c7bc75cd8222..c9716cf3f6df67831ddd86040346ec172858aeeb 100644 --- a/judge/manager/stratego.cpp +++ b/judge/manager/stratego.cpp @@ -157,7 +157,7 @@ void Board::Print(FILE * stream, const Piece::Colour & reveal) * @param stream - the stream to print information to * @param reveal - Pieces matching this colour will have their identify revealed, other pieces will be shown as '#' */ -void Board::PrintPretty(FILE * stream, const Piece::Colour & reveal) +void Board::PrintPretty(FILE * stream, const Piece::Colour & reveal, bool showRevealed) { for (int y=0; y < height; ++y) { @@ -168,7 +168,8 @@ void Board::PrintPretty(FILE * stream, const Piece::Colour & reveal) { fprintf(stream, "."); } - else if (piece->colour != Piece::NONE && (piece->colour == reveal || reveal == Piece::BOTH)) + else if ((piece->colour != Piece::NONE && (piece->colour == reveal || reveal == Piece::BOTH)) + || (piece->beenRevealed && showRevealed)) { switch (piece->colour) { diff --git a/judge/manager/stratego.h b/judge/manager/stratego.h index 098540c9f0f8db365dc0ca8cf942135ac11f7bc0..f439e808f62885f32c6fd379a5c1b329c4ac6d32 100644 --- a/judge/manager/stratego.h +++ b/judge/manager/stratego.h @@ -109,7 +109,7 @@ class 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