KPC / Mbed 2 deprecated Nucleo_othello

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers player.h Source File

player.h

00001 #include "othello.h"
00002 
00003 /*class Player{
00004     public:
00005         int8_t color;
00006         Player(int8_t color){
00007             this->color=color;
00008         }
00009         
00010     uint8_t PutMove(int8_t board[8][8]){
00011         return 0;
00012     }
00013 };*/
00014 
00015 class RandomAI{
00016     public:
00017         int8_t color;
00018         RandomAI(int8_t _color){
00019             this->color=_color;
00020         }
00021         uint8_t PutMove(Board board){
00022             std::vector<uint8_t> coords(GetPutCoords(board,this->color));
00023             uint8_t idx=rand()%coords.size();
00024             return coords[idx];
00025         }
00026 };