Stuff happened
[progcomp2013.git] / agents / java / Square.java
diff --git a/agents/java/Square.java b/agents/java/Square.java
new file mode 100644 (file)
index 0000000..d2bd418
--- /dev/null
@@ -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)
+};

UCC git Repository :: git.ucc.asn.au