/// <summary> /// Returns true if the piece is on its own side of the river, i.e. 0 - 4 (incl) for Red, 5-9 (incl) for black /// </summary> /// <param name="colorOfPiece"></param> /// <returns></returns> internal bool OnMySideOfRiver(PieceControl.Colour colorOfPiece) { if (colorOfPiece == PieceControl.Colour.Red) { return(j < 5); } else { return(j > 4); } }
internal bool isPOsitionOccupiedbyA(PositionOnBoard position, PieceControl.Colour color) { return(theboard[position.Hpos, position.Vpos].color == color); }
//specifying the palace location for black pieces internal bool IsInOpposingPalace(PieceControl.Colour colorOfPiece) { return((i >= 3) && (i <= 5) && (colorOfPiece == PieceControl.Colour.Black ? (j >= 0) && (j <= 2) : (j >= 7) && (j <= 9))); }