(num)
| 150 | let _currPlayer = PLAYER_X |
| 151 | const isGameOver = ()=> _gameOver |
| 152 | const select = (num)=>{ |
| 153 | // console.log(num); |
| 154 | if(_currPlayer==PLAYER_X){ |
| 155 | _state[Math.floor(num/3)][num%3] = 1 |
| 156 | _currPlayer = PLAYER_Y |
| 157 | } |
| 158 | else{ |
| 159 | _state[Math.floor(num/3)][num%3] = -1 |
| 160 | _currPlayer = PLAYER_X |
| 161 | } |
| 162 | validateBoard() |
| 163 | if(!_gameOver) |
| 164 | player_controller.notify(_currPlayer,_state) |
| 165 | |
| 166 | } |
| 167 | const getChar = ()=>{ |
| 168 | if(_currPlayer==PLAYER_X) return 'X' |
| 169 | else return 'O' |
nothing calls this directly
no test coverage detected