MultiplayerMinesweeper/www/scripts/display/html.js

12 lines
374 B
JavaScript
Raw Normal View History

import {game} from "../game/game.js"
2022-06-19 21:54:34 +00:00
export var canvas = document.getElementById('canvas');
export var ctx = canvas.getContext('2d');
export var hud = document.getElementById('hud');
export var hctx = hud.getContext('2d');
canvas.width = game.tileSize*game.gridSize[0];
canvas.height = game.tileSize*game.gridSize[1];
hud.width = canvas.width;
hud.height = canvas.height;