src/game.c

changeset 94
864f59271974
parent 91
c7b586c0ee36
equal deleted inserted replaced
93:9b64437262a2 94:864f59271974
539 } 539 }
540 540
541 void game_play(Settings *settings, GameState *gamestate, int opponent) { 541 void game_play(Settings *settings, GameState *gamestate, int opponent) {
542 inputy = getmaxy(stdscr) - 6; 542 inputy = getmaxy(stdscr) - 6;
543 543
544 uint8_t mycolor = is_server(settings) ? settings->gameinfo.servercolor : 544 uint8_t mycolor = settings->gameinfo.servercolor;
545 opponent_color(settings->gameinfo.servercolor); 545 if (!settings->ishost) {
546 mycolor = opponent_color(mycolor);
547 }
546 548
547 bool myturn = (gamestate->lastmove ? 549 bool myturn = (gamestate->lastmove ?
548 (gamestate->lastmove->move.piece & COLOR_MASK) : BLACK) != mycolor; 550 (gamestate->lastmove->move.piece & COLOR_MASK) : BLACK) != mycolor;
549 551
550 bool running; 552 bool running;

mercurial