Arbitration: a few fixes to improve usage of the text interface

This commit is contained in:
Olivier Teulière 2012-04-22 21:46:33 +02:00
parent 0a5da3772b
commit 36bfa92761
2 changed files with 4 additions and 2 deletions

View file

@ -85,7 +85,7 @@ Move Arbitration::checkWord(const wstring &iWord,
const wstring &iCoords) const
{
Round round;
int res = checkPlayedWord(iCoords, iWord, round);
int res = checkPlayedWord(iCoords, iWord, round, false);
if (res == 0)
return Move(round);
return Move(iWord, iCoords);

View file

@ -746,7 +746,7 @@ void loopArbitration(PublicGame &iGame)
continue;
try
{
wchar_t command = parseCharInList(tokens, 0, L"?adhjsnq");
wchar_t command = parseCharInList(tokens, 0, L"?adhjsfjmet*q");
if (command == L'?')
helpArbitration();
else if (command == L'f')
@ -764,6 +764,8 @@ void loopArbitration(PublicGame &iGame)
const wstring &word = parseLetters(tokens, 1, iGame.getDic());
const wstring &coord = parseAlphaNum(tokens, 2);
const Move &move = iGame.arbitrationCheckWord(word, coord);
if (move.getType() != Move::VALID_ROUND)
throw GameException("Incorrect master move: " + lfw(move.toString()));
iGame.duplicateSetMasterMove(move);
}
else if (command == L'e')