private void setButtonTextByPlayerID(SquareButton i_SquareButton) { ePawnType pawnType = m_ControlPanel.Board.GetPawnByPosition(i_SquareButton.Row, i_SquareButton.Col).Type; ePlayerID playerID = m_ControlPanel.Board.GetPawnByPosition(i_SquareButton.Row, i_SquareButton.Col).Belong; if (playerID == ePlayerID.Player1) { if (pawnType == ePawnType.Regular) { i_SquareButton.Text = "O"; } else { i_SquareButton.Text = "U"; } } else { if (pawnType == ePawnType.Regular) { i_SquareButton.Text = "X"; } else { i_SquareButton.Text = "K"; } } }
// Methods internal Pawn(ePawnType i_Type, ePlayerID i_Belong, Square i_OnSquare) { m_Type = i_Type; m_Belong = i_Belong; m_OnSquare = i_OnSquare; m_Direction = i_Belong == ePlayerID.Player1 ? eDirection.Down : eDirection.Up; m_LegalJumps = new List <LegalJump>(); }