public bool CanTakeAboveLeft( DraughtsBoard board, string identifier, string side ) { DraughtsSquare square = ( DraughtsSquare )board.GetSquare( identifier ); if( square == null ) return false; if( IsEnemyAboveLeft( board, identifier, side ) == true ) { DraughtsSquare tempSquare = ( DraughtsSquare )board.GetSquareAboveLeft( square.Identifier ); if( tempSquare == null ) return false; return IsAboveLeftClear( board, tempSquare.Identifier ); } return false; }
public bool IsFriendlyKingBelowLeft( DraughtsBoard board, string identifier, string side ) { DraughtsSquare square = ( DraughtsSquare )board.GetSquare( identifier ); if( square != null ) return false; DraughtsSquare tempSquare = ( DraughtsSquare )board.GetSquareBelowLeft( square.Identifier ); if( tempSquare == null ) return false; if( tempSquare.IsOccupied == true && tempSquare.IsKing == true && tempSquare.OccupyingName == side ) return true; return false; }