diff options
author | Nathan Vance <nathav63@gmail.com> | 2015-03-11 20:51:33 -0400 |
---|---|---|
committer | Nathan Vance <nathav63@gmail.com> | 2015-03-11 20:51:33 -0400 |
commit | 0d0206dd0a9a1bb53913a76b0ae6179bb627074e (patch) | |
tree | 35948bee50afb58efe124a34d3f609f721773f50 /player_turn.c | |
parent | Started work on ai (diff) | |
download | 7w-0d0206dd0a9a1bb53913a76b0ae6179bb627074e.tar.gz 7w-0d0206dd0a9a1bb53913a76b0ae6179bb627074e.tar.bz2 7w-0d0206dd0a9a1bb53913a76b0ae6179bb627074e.zip |
Implemented basic ai
Diffstat (limited to 'player_turn.c')
-rw-r--r-- | player_turn.c | 8 |
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()) { |