Reversi Game in JS