From dbcb13d3c87133117bc54023c162ad0a202efa1d Mon Sep 17 00:00:00 2001 From: John Fultz Date: Tue, 2 Aug 2016 04:08:43 -0500 Subject: Fixes to allow bad endgames to be loaded from GCGs. Not perfect, but it now does a decent job of not corrupting GCGs when it loads one where players have messed up tile counts/drawing in the end-game. It also tries to annotate these for the player and in any GCG file that's round-tripped. Also, a lot of C++11-izing of ranged iterators. --- quacker/graphicalboard.cpp | 2 +- quacker/graphicalreporter.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'quacker') diff --git a/quacker/graphicalboard.cpp b/quacker/graphicalboard.cpp index 12244a1..cf82f3a 100644 --- a/quacker/graphicalboard.cpp +++ b/quacker/graphicalboard.cpp @@ -325,7 +325,7 @@ QPoint GraphicalBoardFrame::coordinatesOfMark(const QSize &loc) void GraphicalBoardFrame::drawMove(const Quackle::Move &move) { - if (move.action == Quackle::Move::Place) + if (move.action == Quackle::Move::Place || move.action == Quackle::Move::PlaceError) { if (move.tiles().empty()) return; diff --git a/quacker/graphicalreporter.cpp b/quacker/graphicalreporter.cpp index a7ca9f5..d234ff6 100644 --- a/quacker/graphicalreporter.cpp +++ b/quacker/graphicalreporter.cpp @@ -160,6 +160,7 @@ void GraphicalReporter::reportPosition(const Quackle::GamePosition &position, Qu switch ((*it).action) { case Quackle::Move::Place: + case Quackle::Move::PlaceError: { if (m_generateImages) { -- cgit v1.2.3