diff --git a/source/package-lock.json b/source/package-lock.json index 6668e33..e1465d6 100644 --- a/source/package-lock.json +++ b/source/package-lock.json @@ -1,12 +1,12 @@ { "name": "@funky-flask-test/funky-flask-test", - "version": "1.2.3", + "version": "1.2.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@funky-flask-test/funky-flask-test", - "version": "1.2.3", + "version": "1.2.4", "dependencies": { "nano-jsx": "^0.1.0" }, diff --git a/source/package.json b/source/package.json index 21dc4c0..b363a12 100644 --- a/source/package.json +++ b/source/package.json @@ -1,6 +1,6 @@ { "name": "@funky-flask-test/funky-flask-test", - "version": "1.2.3", + "version": "1.2.4", "type": "module", "main": "./dist/index.jsx", "exports": { diff --git a/source/src/index.tsx b/source/src/index.tsx index 1131d4d..ff5247e 100644 --- a/source/src/index.tsx +++ b/source/src/index.tsx @@ -1,4 +1,3 @@ -/** @jsx h */ import { h, render, Component } from 'nano-jsx' class RickGamePanel extends Component { @@ -26,7 +25,6 @@ class RickGamePanel extends Component { } if (this.x > 250 && this.y > 160) { - // Loss condition (simple hazard) this.isGameOver = true window.open('https://www.youtube.com/watch?v=dQw4w9WgXcQ', '_blank') return @@ -40,15 +38,12 @@ class RickGamePanel extends Component { if (!this.ctx) return this.ctx.clearRect(0, 0, 300, 200) - // Ground this.ctx.fillStyle = '#ccc' this.ctx.fillRect(0, 190, 300, 10) - // Hazard block this.ctx.fillStyle = '#f33' this.ctx.fillRect(250, 180, 20, 10) - // Player this.ctx.fillStyle = '#007bff' this.ctx.fillRect(this.x, this.y, 10, 10) } @@ -68,42 +63,33 @@ class RickGamePanel extends Component { this.frame() } - render() { - return ( -