summaryrefslogtreecommitdiff
path: root/move.h
diff options
context:
space:
mode:
authorJohn Fultz <jfultz@wolfram.com>2016-07-03 02:54:38 -0500
committerJohn Fultz <jfultz@wolfram.com>2016-07-03 02:54:38 -0500
commitda2f20720facda706be06b5813ab20057d5b4de9 (patch)
treee2d266054b384d7d5a5fd38c19bf18d1f952ed61 /move.h
parent0cda99549250c87ab9c9b20044767a7615e279c6 (diff)
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.
Diffstat (limited to 'move.h')
-rw-r--r--move.h4
1 files changed, 2 insertions, 2 deletions
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();