public BOARD_VALUE MakeMove(short row, short col) { Board.BOARD_VALUE value = CurrentPlayer == PlayerX ? Board.BOARD_VALUE.X : Board.BOARD_VALUE.O; if (Board.Set(row, col, value)) { this.ChangeTurn(); return(value); } return(Board.BOARD_VALUE.EMPTY); }
private void MakeMove(short row, short col, Button button) { Board.BOARD_VALUE value = GameInstance.MakeMove(row, col); if (value == Board.BOARD_VALUE.X) { button.Content = "X"; } else if (value == Board.BOARD_VALUE.O) { button.Content = "O"; } ChangeTurn(); CheckIsEnd(); }