Ejemplo n.º 1
0
 //Constructor with color, location, and a reference to the board
 public Piece(int all, Point p, Board b, PieceTypeE t)
 {
     allegiance = all;
     loc        = p;
     gameBoard  = b;
     type       = t;
     //Debug.Log ("piece Created " + p.getX() + ", " + p.getY());
 }
Ejemplo n.º 2
0
 public virtual void initialize(int all, Point p, Board b, PieceTypeE t)
 {
     allegiance = all;
     loc        = p;
     gameBoard  = b;
     type       = t;
     //Debug.Log("piece Created at (x,y): (" + p.getX() + ", " + p.getY() + ")");
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes pawn as the piece.initialize code is called and then direction is set
 /// </summary>
 /// <param name="all">Bit representing the color of the Piece.
 /// White = 0, Black = 1;</param>
 /// <param name="p">The location of the piece on the board</param>
 /// <param name="b">A reference to the game board</param>
 /// <param name="t">The type of piece being created.</param>
 override public void initialize(int all, Point p, Board b, PieceTypeE t)
 {
     base.initialize(all, p, b, t);
     if (all == 0)
     {
         direction = 1;
     }
     else
     {
         direction = -1;
     }
 }
Ejemplo n.º 4
0
 public Bishop(int all, Point p, Board b, PieceTypeE t) : base(all, p, b, t)
 {
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Constructor that should be used.
 /// </summary>
 /// <param name="all">Bit representing the color of the Piece.
 /// White = 0, Black = 1;</param>
 /// <param name="p">The location of the piece on the board</param>
 /// <param name="b">A reference to the game board</param>
 /// <param name="t">The type of piece being created.</param>
 public Rook(int all, Point p, Board b, PieceTypeE t) : base(all, p, b, t)
 {
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Constructor that should be used.
 /// </summary>
 /// <param name="all">Bit representing the color of the Piece.
 /// White = 0, Black = 1;</param>
 /// <param name="p">The location of the piece on the board</param>
 /// <param name="b">A reference to the game board</param>
 /// <param name="t">The type of piece being created.</param>
 public Queen(int all, Point p, Board b, PieceTypeE t) : base(all, p, b, t)
 {
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Constructor that should be used.
 /// </summary>
 /// <param name="all">Bit representing the color of the Piece.
 /// White = 0, Black = 1;</param>
 /// <param name="p">The location of the piece on the board</param>
 /// <param name="b">A reference to the game board</param>
 /// <param name="t">The type of piece being created.</param>
 public Knight(int all, Point p, Board b, PieceTypeE t) : base(all, p, b, t)
 {
 }