summaryrefslogtreecommitdiff
path: root/src/tetris/piece/IPiece.java
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2012-12-13 22:14:24 -0800
committerJesse Morgan <jesse@jesterpm.net>2012-12-13 22:14:24 -0800
commit87e98e00e0ca5ac4229091aa9bb0e5c09093f50f (patch)
treeb3e73ba3a22d1e04a6dd87111db27ac7d698d5f3 /src/tetris/piece/IPiece.java
Tetris project from TCSS305 class.
Original project was in SVN on the school servers, so the versioning history is gone.
Diffstat (limited to 'src/tetris/piece/IPiece.java')
-rw-r--r--src/tetris/piece/IPiece.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/tetris/piece/IPiece.java b/src/tetris/piece/IPiece.java
new file mode 100644
index 0000000..592887f
--- /dev/null
+++ b/src/tetris/piece/IPiece.java
@@ -0,0 +1,43 @@
+/*
+ * Jesse Morgan <jesterpm@u.washington.edu>
+ *
+ * TCSS 305 Ð Autumn 2009
+ * Tetris Project
+ * 17 November 2009
+ */
+
+package tetris.piece;
+
+/**
+ * Class to represent a Tetris I piece.
+ *
+ * @author Jesse Morgan <jesterpm@u.washington.edu>
+ * @version 1.0 17 November 2009
+ */
+public class IPiece extends TetrisPiece {
+ // Private Constants
+ /**
+ * X Rotation Point.
+ */
+ private static final double ROTATION_X = 1.5;
+
+ /**
+ * Y Rotation Point.
+ */
+ private static final double ROTATION_Y = 2;
+
+ /**
+ * Array of of points for the I Piece (since it contains a 3).
+ */
+ private static final double[] POINTS = new double[] {0, 2, 1, 2, 2, 2, 3, 2};
+
+ /**
+ * Setup the I Piece.
+ *
+ * @param the_x Tetris piece X-coord.
+ * @param the_y Tetris piece Y-coord.
+ */
+ public IPiece(final int the_x, final int the_y) {
+ super(the_x, the_y, POINTS, ROTATION_X, ROTATION_Y);
+ }
+}