From b16b969406c7ed7222d218084127e3068ed87560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Teuli=C3=A8re?= Date: Sat, 16 Apr 2005 15:43:14 +0000 Subject: [PATCH] When the letters to change are incorrect, do not end the turn for the player --- game/freegame.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/game/freegame.cpp b/game/freegame.cpp index bef7333..eff76d6 100644 --- a/game/freegame.cpp +++ b/game/freegame.cpp @@ -2,7 +2,7 @@ * Copyright (C) 2005 Eliot * Authors: Olivier Teuliere * - * $Id: freegame.cpp,v 1.10 2005/04/02 21:21:30 ipkiss Exp $ + * $Id: freegame.cpp,v 1.11 2005/04/16 15:43:14 ipkiss Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -206,14 +206,13 @@ int FreeGame::pass(const string &iToChange, int n) vector tilesVect; for (unsigned int i = 0; i < iToChange.size(); i++) { - Tile tile(iToChange[i]); - if (islower(iToChange[i])) - tile = Tile::Joker(); + Tile tile(toupper(iToChange[i])); tilesVect.push_back(tile); } int res = helperPass(tilesVect, n); - endTurn(); + if (res == 0) + endTurn(); return res; }