Week 4: Pull request
Week 6:
The Singleton pattern is applied at the game instance:
public static getInstance() {
if (!Game.gameInstance) {
Game.gameInstance = new Game();
}
return Game.gameInstance;
}
It is called by the following code:
window.addEventListener("load", function () {
let game = Game.getInstance();
});