|
01 packagepackage is used to name the directory or folder a class is in scg.ch13.pieces;
02
03 importimport means to make the classes and/or packages available in this program java.awt.Color;
04 importimport means to make the classes and/or packages available in this program java.util.ArrayList;
05 importimport means to make the classes and/or packages available in this program java.util.Arrays;
06
07 importimport means to make the classes and/or packages available in this program scg.ch13.util.Position;
08
09 /** The J, or mirrored-L, piece. */
10 publicpublic is used to indicate unrestricted access (any other class can have access) classclass is a group of fields and methods used for making objects J_Piece
11 extendsextends means to customize or extend the functionality of a class Piece {open braces start code blocks and must be matched with a close brace
12 @SuppressWarnings("unchecked")
13 publicpublic is used to indicate unrestricted access (any other class can have access) J_Piece(intint is the type for whole numbers and it is short for integer facing, Color color) {open braces start code blocks and must be matched with a close brace
14 super(facing, color);
15 blockPositionByFacing =this assignment operator makes the left side equal to the right side newnew is used to create objects by calling the constructor ArrayList<ArrayList<Position>>this performs a bit-wise right shift(Arrays
16 .asList(
17 newnew is used to create objects by calling the constructor ArrayList<Position>(
18 Arrays.asList(newnew is used to create objects by calling the constructor Position(1, 2), newnew is used to create objects by calling the constructor Position(2, 3),
19 newnew is used to create objects by calling the constructor Position(3, 2), newnew is used to create objects by calling the constructor Position(2, 1))),
20 newnew is used to create objects by calling the constructor ArrayList<Position>(
21 Arrays.asList(newnew is used to create objects by calling the constructor Position(2, 2), newnew is used to create objects by calling the constructor Position(2, 2),
22 newnew is used to create objects by calling the constructor Position(2, 2), newnew is used to create objects by calling the constructor Position(2, 2))),
23 newnew is used to create objects by calling the constructor ArrayList<Position>(
24 Arrays.asList(newnew is used to create objects by calling the constructor Position(3, 2), newnew is used to create objects by calling the constructor Position(2, 1),
25 newnew is used to create objects by calling the constructor Position(1, 2), newnew is used to create objects by calling the constructor Position(2, 3))),
26 newnew is used to create objects by calling the constructor ArrayList<Position>(
27 Arrays.asList(newnew is used to create objects by calling the constructor Position(3, 1), newnew is used to create objects by calling the constructor Position(1, 1),
28 newnew is used to create objects by calling the constructor Position(1, 3), newnew is used to create objects by calling the constructor Position(3, 3)))));
29
30 initialOffsetByFacing =this assignment operator makes the left side equal to the right side newnew is used to create objects by calling the constructor ArrayList<Position>(Arrays.asList(
31 newnew is used to create objects by calling the constructor Position(-1, -1), newnew is used to create objects by calling the constructor Position(-1, -1),
32 newnew is used to create objects by calling the constructor Position(-1, -2), newnew is used to create objects by calling the constructor Position(-2, -1)));
33
34 generateBlocks();
35 }close braces end code blocks and must match an earlier open brace
36 }close braces end code blocks and must match an earlier open brace
37
38 //Uploaded on Mon Mar 29 21:41:26 EDT 2010
|