public void MoveCheckerOnBoard(Point i_CurrentLocation, Point i_NextLocation) { if (needToBeKing(i_NextLocation)) { this[i_NextLocation].Sign = BoardCell.GetKingSignFromPlayerId(this[i_CurrentLocation].OwnerId); this[i_NextLocation].Direction = BoardCell.eDirection.UpAndDown; } else { this[i_NextLocation].Sign = this[i_CurrentLocation].Sign; this[i_NextLocation].Direction = this[i_CurrentLocation].Direction; } this[i_NextLocation].OwnerId = this[i_CurrentLocation].OwnerId; if (this[i_NextLocation].OptionsList == null) { this[i_NextLocation].OptionsList = new Dictionary <Point, Game.eMoveType>(); } MakeCellEmpty(i_CurrentLocation); }
private bool isOpponentCell(BoardCell i_StartCell, BoardCell i_DestinationCell) { bool isOpponentCell = i_StartCell.OwnerId != i_DestinationCell.OwnerId; return(isOpponentCell && i_DestinationCell.OwnerId != Game.ePlayerId.None); }