From 88ebc23c103d4dc25bb177128ca314472cfe825c Mon Sep 17 00:00:00 2001
From: Dominik George <nik@naturalnet.de>
Date: Thu, 22 Apr 2021 21:58:14 +0200
Subject: [PATCH] Fix up constructor

---
 src/frontend/game.js | 6 +++---
 src/widget.js        | 5 ++++-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/frontend/game.js b/src/frontend/game.js
index 875d054..ca28013 100644
--- a/src/frontend/game.js
+++ b/src/frontend/game.js
@@ -2,11 +2,11 @@ import Phaser from 'phaser';
 import TestScene from './scenes/test';
 
 class Game {
-  constructo() {
+  constructor(width, height) {
     this.config = {
       type: Phaser.AUTO,
-      width: 800,
-      height: 600,
+      width: width,
+      height: height,
       scene: TestScene
     };
 
diff --git a/src/widget.js b/src/widget.js
index f37ebd9..823f6d4 100644
--- a/src/widget.js
+++ b/src/widget.js
@@ -1,4 +1,7 @@
 import WidgetBackend from './backends/widget';
 import Game from './frontend/game';
 
-let game = new Game();
+const width = 800;
+const height = 600;
+
+let game = new Game(width, height);
-- 
GitLab