import Clock from "./clock.js" import Resources from "./resources.js" import Morale from "./morale.js" document.addEventListener("DOMContentLoaded", () => { const canvas = document.querySelector("canvas") const ctx = canvas.getContext("2d") const c = new Clock("hi", "blue", 9, 100, 200, 200 ) const r = new Resources("ho", "green", 12, 600, 100, 400 ) const m = new Morale("oh no", "red", 600, 100, 500 ) function draw(x) { ctx.fillStyle = "white" ctx.fillRect(0, 0, canvas.width, canvas.height) c.draw(ctx) r.draw(ctx) m.draw(ctx) window.requestAnimationFrame(draw) } window.requestAnimationFrame(draw) })