Text interface: correctly check the return value when passing

This commit is contained in:
Olivier Teulière 2012-04-09 00:21:09 +02:00
parent 5bb492ceb4
commit fd1773ef6e
3 changed files with 6 additions and 2 deletions

View file

@ -15,6 +15,7 @@ commande> a T
Rack 0: EENN+MEN
Rack 1: E+EEGAIS
commande> p MA
Cannot pass (2)
commande> a T
Rack 0: EENN+MEN
Rack 1: E+EEGAIS

View file

@ -33,7 +33,9 @@ commande> p
commande> p
commande> p
commande> p
Cannot pass (3)
commande> p
Cannot pass (3)
commande> a S
Score 0: -11
Score 1: 793

View file

@ -685,8 +685,9 @@ void loopFreegame(PublicGame &iGame)
{
letters = parseLetters(tokens, 1, iGame.getDic());
}
// TODO: check return value
iGame.freeGamePass(letters);
int res = iGame.freeGamePass(letters);
if (res != 0)
printf("Cannot pass (%d)\n", res);
}
else if (command == L'q')
quit = true;