aboutsummaryrefslogtreecommitdiff
path: root/player_turn.c
diff options
context:
space:
mode:
authorNathan Vance <nathav63@gmail.com>2015-03-11 20:51:33 -0400
committerNathan Vance <nathav63@gmail.com>2015-03-11 20:51:33 -0400
commit0d0206dd0a9a1bb53913a76b0ae6179bb627074e (patch)
tree35948bee50afb58efe124a34d3f609f721773f50 /player_turn.c
parentStarted work on ai (diff)
download7w-0d0206dd0a9a1bb53913a76b0ae6179bb627074e.tar.gz
7w-0d0206dd0a9a1bb53913a76b0ae6179bb627074e.tar.bz2
7w-0d0206dd0a9a1bb53913a76b0ae6179bb627074e.zip
Implemented basic ai
Diffstat (limited to 'player_turn.c')
-rw-r--r--player_turn.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/player_turn.c b/player_turn.c
index 1759c5f..bd9e805 100644
--- a/player_turn.c
+++ b/player_turn.c
@@ -67,10 +67,8 @@ void player_turn(int player)
case ENTER:
if(player_build(focus, cursor, player)) {
trade_commit(player);
- player++;
- cursor = 0;
- focus = data_numplayers();
clearmessage();
+ return;
}
break;
case '\t': focus = (focus+1)%(data_numplayers()+1);
@@ -79,10 +77,6 @@ void player_turn(int player)
break;
default: break;
}
- if(player >= data_numplayers()) {
- data_endturn();
- player = 0;
- }
if(focus < 0) focus = data_numplayers();
focus = focus%(data_numplayers()+1);
if(focus == data_numplayers()) {
bgstack15