summaryrefslogtreecommitdiff
path: root/src/tetris/piece/IPiece.java
blob: 830036327373d32c08c8450489e376ebd1c17f75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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);
  }
}