From 4525296e60be81e49f914dc2043c293168f21d70 Mon Sep 17 00:00:00 2001 From: sigmasternchen Date: Tue, 29 Oct 2024 21:44:08 +0100 Subject: [PATCH] more realistic game field --- html/static/styles.css | 2 +- src/game/Game.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/html/static/styles.css b/html/static/styles.css index 7626369..0d36c50 100644 --- a/html/static/styles.css +++ b/html/static/styles.css @@ -1,6 +1,6 @@ #game { - width: 1000px; + width: calc((88px + 1px) * 11 + 1px); height: 500px; background-color: red; position: relative; diff --git a/src/game/Game.ts b/src/game/Game.ts index 5358880..c45730d 100644 --- a/src/game/Game.ts +++ b/src/game/Game.ts @@ -7,7 +7,7 @@ export class Game { constructor(root: HTMLElement) { this.root = root; - this.banners = makeBanners(5, i => new Position(i * 88, i)); + this.banners = makeBanners(11 * 6, i => new Position((i % 11) * (88 + 1), (0 | (i / 11)) * (31 + 1))); } public load(): Promise {