Skip to content

DesignPatterns #12

@Juseperez

Description

@Juseperez

Good evening, for a homework we checked for uses of Design Patterns, so here are some recommendations to include Design Patterns.
https://github.com/Kleito23/PatronesDiseno/tree/main/LearnJavaSnakeGame

Firstly, Singleton, since you only have one instance of QuestionManager, you can use this design pattern to make sure there's only one.
Singleton

Secondly, Strategy, there are many ways that the snake moves, so you can use the design pattern strategy .
Strategy

Lastly, Observer, in board there are methods that check if the apple is eaten or if the snake crashed into itself or a wall, Observer is a way that makes it more comprehensible of the methods that observes the changes and updates the game.
Observer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions