SpampedeBrain - The "View" in MVC.
More...
|
| | SpampedeDisplay (SpampedeData theBoardInput, Graphics theScreenInput, int widthInput, int heightInput) |
| | Constructor. More...
|
| |
| void | drawSquare (int x, int y, Color cellColor) |
| | Draws a cell-sized square with its upper-left corner at the given pixel coordinates (i.e., x pixels to the right and y pixels below the upper-left corner) on the display. More...
|
| |
|
void | displayTitle () |
| | Displays the title of the game.
|
| |
|
void | displayGameOver () |
| | Displays the game-over message.
|
| |
|
void | displaySnakeCount (int count) |
| | Displays the snake eaten count.
|
| |
|
void | displayLives (int lives) |
| | Displays the lives remaining.
|
| |
| | SpampedeDisplay (SpampedeData theBoardInput, Graphics theScreenInput, int widthInput, int heightInput) |
| | Constructor. More...
|
| |
| void | drawSquare (int x, int y, Color cellColor) |
| | Draws a cell-sized square with its upper-left corner at the given pixel coordinates (i.e., x pixels to the right and y pixels below the upper-left corner) on the display. More...
|
| |
|
void | displayTitle () |
| | Displays the title of the game.
|
| |
|
void | displayGameOver () |
| | Displays the game-over message.
|
| |
|
void | displaySnakeCount (int count) |
| | Displays the snake eaten count.
|
| |
|
void | displayLives (int lives) |
| | Displays the lives remaining.
|
| |
|
|
static Image | imageSpam |
| | a picture of a can of spam
|
| |
|
|
SpampedeData | theData |
| | reference to the board/spampede data being drawn
|
| |
|
Graphics | theScreen |
| | the display where the board is drawn
|
| |
|
int | width |
| | width of the display in pixels
|
| |
|
int | height |
| | height of the display in pixels
|
| |
SpampedeBrain - The "View" in MVC.
- Author
- Max Treutelaar
-
CS60 instructors
| com.gradescope.spampede.SpampedeDisplay.SpampedeDisplay |
( |
SpampedeData |
theBoardInput, |
|
|
Graphics |
theScreenInput, |
|
|
int |
widthInput, |
|
|
int |
heightInput |
|
) |
| |
Constructor.
- Parameters
-
| theBoardInput | the data being displayed |
| theScreenInput | the display to draw the board |
| widthInput | width of the display (in pixels) |
| heightInput | height of the display (in pixels) |
| com.gradescope.spampede.SpampedeDisplay.SpampedeDisplay |
( |
SpampedeData |
theBoardInput, |
|
|
Graphics |
theScreenInput, |
|
|
int |
widthInput, |
|
|
int |
heightInput |
|
) |
| |
Constructor.
- Parameters
-
| theBoardInput | the data being displayed |
| theScreenInput | the display to draw the board |
| widthInput | width of the display (in pixels) |
| heightInput | height of the display (in pixels) |
| void com.gradescope.spampede.SpampedeDisplay.drawSquare |
( |
int |
x, |
|
|
int |
y, |
|
|
Color |
cellColor |
|
) |
| |
Draws a cell-sized square with its upper-left corner at the given pixel coordinates (i.e., x pixels to the right and y pixels below the upper-left corner) on the display.
- Parameters
-
| x | x-coordinate of the square, between 0 and this.width-1 inclusive |
| y | y-coordinate of the square, between 0 and this.width-1 inclusive |
| cellColor | color of the square being drawn |
| void com.gradescope.spampede.SpampedeDisplay.drawSquare |
( |
int |
x, |
|
|
int |
y, |
|
|
Color |
cellColor |
|
) |
| |
Draws a cell-sized square with its upper-left corner at the given pixel coordinates (i.e., x pixels to the right and y pixels below the upper-left corner) on the display.
- Parameters
-
| x | x-coordinate of the square, between 0 and this.width-1 inclusive |
| y | y-coordinate of the square, between 0 and this.width-1 inclusive |
| cellColor | color of the square being drawn |
The documentation for this class was generated from the following file:
- spampede/SpampedeDisplay.java