basic Websocket client-server

This commit is contained in:
LuckyLaszlo
2022-11-16 15:40:44 +01:00
parent 2f62331559
commit a873b23d0f
9 changed files with 305 additions and 40 deletions

View File

@@ -25,8 +25,9 @@ class GameArea {
deleteKey(key: string) {
key = key.toLowerCase();
var i = this.keys.indexOf(key);
if (i != -1)
if (i != -1) {
this.keys.splice(i, 1);
}
}
clear() {
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);