X-Git-Url: https://git.ucc.asn.au/?p=progcomp2013.git;a=blobdiff_plain;f=agents%2Fjava%2FSquare.java;fp=agents%2Fjava%2FSquare.java;h=d2bd418a7546287f367421c4d94083937236bd60;hp=0000000000000000000000000000000000000000;hb=159708785516e4dd5a1ddceadd1e371f48dd3d23;hpb=c2fbd2e5499e4817c156f9dbabea5215d83729dd diff --git a/agents/java/Square.java b/agents/java/Square.java new file mode 100644 index 0000000..d2bd418 --- /dev/null +++ b/agents/java/Square.java @@ -0,0 +1,22 @@ +/** + * @class Square + * @purpose Represent a Square on the board; not necessarily occupied + */ +public class Square +{ + public Square(int new_x, int new_y, Piece new_piece) + { + this.x = new_x; + this.y = new_y; + this.piece = new_piece; + } + public Square(Square cpy) + { + this.x = cpy.x; + this.y = cpy.y; + this.piece = cpy.piece; + } + public int x; + public int y; // position of the square + public Piece piece; // Piece that is in the Square (null if unoccupied) +};