OLLEO-DIGITAL / Jervis-Tetch

A Simon game variant influenced by Jervis Tetch, the villain from the DC Batman comic series
GNU General Public License v3.0
2 stars 0 forks source link

Create gameboard canvas #15

Open LionOnTheWeb opened 1 year ago

LionOnTheWeb commented 1 year ago

Overview

As a Jervis-Tetch user I want to have a canvas/gameboard that I can play the game on, with a landing page which is the +page.svelte file in the root of the src/routes directory.

Tasks

References

LionOnTheWeb commented 1 year ago

Example code from chat gpt for src/routes/+page.svelte


<script>
  let canvas;
  let ctx;

  function init() {
    canvas = document.getElementById('myCanvas');
    ctx = canvas.getContext('2d');
    ctx.fillStyle = 'green';
    ctx.fillRect(10, 10, 100, 100);
  }

  onMount(() => {
    init();
  });
</script>

<canvas id="myCanvas" width="200" height="200"></canvas>