Othello
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:8c7f841516ab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Sep 04 04:07:41 2018 +0000 @@ -0,0 +1,23 @@ +#include "led_func.h" +#include "othellomain.h" + +Ticker LedBoard; + +void SetLEDBoard(Board board){ + for(uint8_t i=0;i<8;i++){ + for(uint8_t j=0;j<8;j++){ + if(board.board[i][j]==BLACK)led_board[i][j].SetColor(CBLUE); + if(board.board[i][j]==WHITE)led_board[i][j].SetColor(CGREEN); + } + } +} + +int main(){ + ResetLEDBoard(); + RandomAI player1(BLACK); + RandomAI player2(WHITE); + Board mainboard; + LedBoard.attach_us(&PrintLEDBoard,100); + Play(player1,player2,mainboard); + while(1){} +} \ No newline at end of file