internal override bool Move(string nextCoordStr)
        {
            var nextCoord = new GameCoord(nextCoordStr);

            return(nextCoord.Col == _currentCoord.Col && nextCoord.Row > _currentCoord.Row &&
                   (nextCoord.Row - _currentCoord.Row == 1 || _currentCoord.Row == '2' && nextCoord.Row == '4'));
        }
        internal override bool Move(string nextCoordStr)
        {
            var nextCoord = new GameCoord(nextCoordStr);

            return((nextCoord.Col == _currentCoord.Col || nextCoord.Row == _currentCoord.Row) &&
                   (nextCoord.Col != _currentCoord.Col || nextCoord.Row != _currentCoord.Row));
        }
 public Pawn(GameCoord coord)
     : base(coord)
 {
 }
 public ChessFigure(GameCoord currentCoord)
 {
     _currentCoord = currentCoord;
 }
Esempio n. 5
0
 public void Shoot(int x, int y, int dx, int dy)
 {
     output = LaserPath(x, y, dx, dy);
 }
Esempio n. 6
0
 public static Vector3 gridToBoxCoords(GameCoord coords)
 {
     return new Vector3(coords.x * Baffle.size, coords.y * Baffle.size, 0);
 }
Esempio n. 7
0
 public static Vector3 gridToScreenCoords(GameCoord coords)
 {
     return boxToScreenCoords(gridToBoxCoords(coords));
 }
 public Rook(GameCoord coord)
     : base(coord)
 {
 }