|
| Grid (Color[,] grid) |
|
Create a Grid object with a given grid of colors
More...
|
|
bool | CanGo (Tetrominoe tetrominoe, Point point) |
|
If the tetrominoe is within the grid and doesn't overlap with any other tetrominoe, then return true
More...
|
|
int | LineFull () |
|
If the line is full, return the line number, otherwise return -1
More...
|
|
void | ClearLine (int line) |
|
For each column, move all the blocks down one row, and then clear the top row
More...
|
|
void | PrintTetrominoe (Tetrominoe t) |
| For each point in the shape, add the shape's coordinates to the point, and if the point is true, set the grid's color to the shape's color. More...
|
|
override string | ToString () |
| Covert the gid to a color string More...
|
|
string | ToString (Tetrominoe t) |
| Covert the gid to a color string with the current tetrominoe More...
|
|
|
Color[,] | CGrid [get] |
|
Point | MinGrid [get] |
|
Point | MaxGrid [get] |
|
◆ Grid()
Grid.Grid |
( |
Color |
grid[,] | ) |
|
Create a Grid object with a given grid of colors
- Parameters
-
◆ CanGo()
bool Grid.CanGo |
( |
Tetrominoe |
tetrominoe, |
|
|
Point |
point |
|
) |
| |
If the tetrominoe is within the grid and doesn't overlap with any other tetrominoe, then return true
- Parameters
-
Tetrominoe | The tetrominoe to check if it can go to the point. |
Point | The point where the tetrominoe will be placed. |
- Returns
- A boolean value.
◆ ClearLine()
void Grid.ClearLine |
( |
int |
line | ) |
|
For each column, move all the blocks down one row, and then clear the top row
- Parameters
-
◆ LineFull()
If the line is full, return the line number, otherwise return -1
- Returns
- The y value of the first full line.
◆ PrintTetrominoe()
For each point in the shape, add the shape's coordinates to the point, and if the point is true, set the grid's color to the shape's color.
- Parameters
-
◆ ToString() [1/2]
override string Grid.ToString |
( |
| ) |
|
Covert the gid to a color string
- Returns
- A string representation of the grid.
◆ ToString() [2/2]
Covert the gid to a color string with the current tetrominoe
- Parameters
-
- Returns
- A string representation of the grid.
The documentation for this class was generated from the following file: