Additional LocalExceptions.

This commit is contained in:
lotodore
2007-10-14 17:49:15 +00:00
parent 6822e60805
commit c5c9ce262a
2 changed files with 6 additions and 4 deletions
+4 -4
View File
@@ -66,7 +66,8 @@ Game::Game(GuiInterface* gui, boost::shared_ptr<EngineFactory> factory,
break;
++player_i;
}
assert(player_i != player_end);
if (player_i == player_end)
throw LocalException(ERR_DEALER_NOT_FOUND);
dealerPosition = startData.startDealerPlayerId;
// Board erstellen
@@ -228,8 +229,6 @@ void Game::initHand()
void Game::startHand()
{
assert(actualHand);
//GUI bereinigen
myGui->nextRoundCleanGui();
@@ -260,7 +259,8 @@ boost::shared_ptr<PlayerInterface> Game::getPlayerByUniqueId(unsigned id)
boost::shared_ptr<PlayerInterface> Game::getCurrentPlayer()
{
boost::shared_ptr<PlayerInterface> tmpPlayer = getPlayerByUniqueId(getCurrentHand()->getCurrentBeRo()->getCurrentPlayersTurnId());
assert(tmpPlayer.get());
if (!tmpPlayer.get())
throw LocalException(ERR_CURRENT_PLAYER_NOT_FOUND);
return tmpPlayer;
}