diff options
Diffstat (limited to 'TrollTron.cpp')
-rw-r--r-- | TrollTron.cpp | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/TrollTron.cpp b/TrollTron.cpp index a8af7d7..8579cbd 100644 --- a/TrollTron.cpp +++ b/TrollTron.cpp @@ -70,44 +70,37 @@ int main(int argc, char **argv) { pPlayer = game.addPlayer();
// And create its controller
- pPlayer->setController(mainWindow.generateNewKeyboardController(pPlayer,
- keys[currNumHumanPlayers*2],
- keys[currNumHumanPlayers*2+1]));
+ pPlayer->setController(mainWindow.generateNewKeyboardController(pPlayer,
+ keys[currNumHumanPlayers*2],
+ keys[currNumHumanPlayers*2+1]));
// Count 1 more (human) player
currNumPlayers ++;
currNumHumanPlayers ++;
- }
+ } else argFail = true;
}
else
{
- bool isABot = false;
- // If it's "easy"
if(! strcmp(argv[argNum], "easy"))
{
- isABot = true;
botInhibitDelay = 10;
botRandomTurn = 10;
}
else if(! strcmp(argv[argNum], "medium"))
{
- isABot = true;
botInhibitDelay = 3;
botRandomTurn = 6;
}
else if(! strcmp(argv[argNum], "hard"))
{
- isABot = true;
botInhibitDelay = 1;
botRandomTurn = 3;
} else argFail = true;
- if(isABot)
- {
- // Count 1 more (non human) player
- currNumPlayers ++;
- pPlayer = game.addPlayer();
- // And instanciate its AI
- pPlayer->setController(new AIController(pPlayer, game.getField(), botInhibitDelay, botRandomTurn));
- }
+
+ // Count 1 more (non human) player
+ currNumPlayers ++;
+ pPlayer = game.addPlayer();
+ // And instanciate its AI
+ pPlayer->setController(new AIController(pPlayer, game.getField(), botInhibitDelay, botRandomTurn));
}
}
|