From da2f20720facda706be06b5813ab20057d5b4de9 Mon Sep 17 00:00:00 2001 From: John Fultz Date: Sun, 3 Jul 2016 02:54:38 -0500 Subject: Fix problems with "ex n" where n is a number. Found a crash where you enter "ex 4" twice, and it would crash. This led me to look up how this was implemented, and it wasn't very robust. It also didn't save properly in the GCG. So I created a new move type which I called a BlindExchange and implemented it throughout the system. --- move.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'move.h') diff --git a/move.h b/move.h index f4d1827..e628b52 100644 --- a/move.h +++ b/move.h @@ -43,7 +43,7 @@ namespace Quackle class Move { public: - enum Action { Place = 0, Exchange, Pass, UnusedTilesBonus, TimePenalty, Nonmove }; + enum Action { Place = 0, Exchange, BlindExchange, Pass, UnusedTilesBonus, TimePenalty, Nonmove }; // creates a pass move with 0 equity; // tiles is "", score and equity are zero @@ -124,7 +124,7 @@ public: static Move createChallengedPhoney(UVString placeString, LetterString word); static Move createChallengedPhoney(int zeroIndexedRow, int zeroIndexedColumn, bool horizontal, LetterString word); - static Move createExchangeMove(LetterString tilesToExchange); + static Move createExchangeMove(LetterString tilesToExchange, bool isBlind); static Move createUnusedTilesBonus(LetterString unusedTiles, int bonus); static Move createTimePenalty(int penalty); static Move createPassMove(); -- cgit v1.2.3