summaryrefslogtreecommitdiff
path: root/src/tetris/piece/SPiece.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/tetris/piece/SPiece.java')
-rw-r--r--src/tetris/piece/SPiece.java39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/tetris/piece/SPiece.java b/src/tetris/piece/SPiece.java
new file mode 100644
index 0000000..92e5901
--- /dev/null
+++ b/src/tetris/piece/SPiece.java
@@ -0,0 +1,39 @@
+/*
+ * Jesse Morgan <jesterpm@u.washington.edu>
+ *
+ * TCSS 305 Ð Autumn 2009
+ * Tetris Project
+ * 17 November 2009
+ */
+
+package tetris.piece;
+
+/**
+ * Class to represent a Tetris S piece.
+ *
+ * @author Jesse Morgan <jesterpm@u.washington.edu>
+ * @version 1.0 17 November 2009
+ */
+public class SPiece extends TetrisPiece {
+ // Private Constants
+ /**
+ * X Rotation Point.
+ */
+ private static final double ROTATION_X = 1;
+
+ /**
+ * Y Rotation Point.
+ */
+ private static final double ROTATION_Y = 1.5;
+
+
+ /**
+ * Setup the S Piece.
+ *
+ * @param the_x Tetris piece X-coord.
+ * @param the_y Tetris piece Y-coord.
+ */
+ public SPiece(final int the_x, final int the_y) {
+ super(the_x, the_y, new double[] {1, 1, 2, 1, 0, 2, 1, 2}, ROTATION_X, ROTATION_Y);
+ }
+} \ No newline at end of file