change to final_test
Dependencies: 4DGL-uLCD-SE EthernetInterface HTTPClient mbed-rtos mbed
Fork of Fianl_test by
Revision 4:e928ee72a948, committed 2015-05-01
- Comitter:
- jderiso2
- Date:
- Fri May 01 02:39:55 2015 +0000
- Parent:
- 3:b834ab4a53d1
- Commit message:
- Update for losing player to exit main loop and display winner
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r b834ab4a53d1 -r e928ee72a948 main.cpp --- a/main.cpp Mon Apr 27 17:38:55 2015 +0000 +++ b/main.cpp Fri May 01 02:39:55 2015 +0000 @@ -20,7 +20,6 @@ DigitalIn in7(p18); DigitalIn in8(p19); -Mutex stdio_mutex; @@ -359,9 +358,12 @@ break; // game over // wait for turn while(GetCurrentPlayer(gameId) != playerId){ wait(1.5); } - GetBoardState(gameId, board.get_board()); printBoard(board.get_board()); + + state = GetGameState(gameId); + if (state == OVER) + break; int moveX, moveY; ScanForMove(&moveX,&moveY, board.get_board()); PostMove(playerId, gameId, moveX, moveY);