Class SnakeGameRenderer
java.lang.Object
com.csse3200.game.minigames.snake.rendering.SnakeGameRenderer
Renders all elements of the Snake mini-game, including the grid, apple, snake, and scoreboard.
-
Constructor Summary
ConstructorsConstructorDescriptionSnakeGameRenderer
(SnakeGame game) Initialises the SnakeGameRenderer and its sub-renderers. -
Method Summary
-
Constructor Details
-
SnakeGameRenderer
Initialises the SnakeGameRenderer and its sub-renderers.- Parameters:
game
- The SnakeGame instance containing game state and logic.
-
-
Method Details
-
render
public void render(int score) Renders the entire snake game including grid, apple, snake, and scoreboard.- Parameters:
score
- The current score to be displayed on the scoreboard.
-
resize
public void resize(int width, int height) Resizes the screen- Parameters:
width
- width of the screenheight
- height of the screen
-
dispose
public void dispose()Disposes of resources used by the renderer, including textures and the SpriteBatch.
-