A file player.py containg the MyPlayer class with the following methods
| method | input | output | explanation |
|---|---|---|---|
__init__ | my_color, opponent_color | None | A player contructor. The color is either 0 or 1 |
move | board (n x n game board) | r , c (row, column) a tuple - coordinates of your move | The input is 2D list - current game board. Method should return a valid move. Example: (0,0) means putting your stone to the position board[r][c]. If no valid move is possible return None. board values -1 for empty space and 0/1 for the stone color. The max time spent within the move method is 5 secs |
Example of MyPlayer implementation
class MyPlayer: '''super-smart indeed''' def __init__(self, my_color,opponent_color): self.name = 'username' #username of the studen def move(self,board): return (*,*)
See README_EN.txt in reversi.zip