From 71650b1320e34ca4e1e030590b1cafe599ba20e1 Mon Sep 17 00:00:00 2001 From: 5kh0 <148277487+5kh0@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:12:10 -0600 Subject: [PATCH] add my silly game silly game added --- games/Yellow_Creature.js | 151 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 games/Yellow_Creature.js diff --git a/games/Yellow_Creature.js b/games/Yellow_Creature.js new file mode 100644 index 0000000000..b998723587 --- /dev/null +++ b/games/Yellow_Creature.js @@ -0,0 +1,151 @@ +/* +First time? Check out the tutorial game: +https://sprig.hackclub.com/gallery/getting_started + +@title: A Fantastical Adventure Through Weedland +@author: +@tags: [] +@addedOn: 2024-00-00 +*/ + +//Functions i guess +function placeRandomSprite(spriteType) { + const emptyTiles = []; + const mapWidth = width(); + const mapHeight = height(); + for (let x = 0; x < mapWidth; x++) { + for (let y = 0; y { + getFirst(player).y -= 1; +}); +onInput("a", () => { + getFirst(player).x -= 1; +}); +onInput("s", () => { + getFirst(player).y += 1; +}); +onInput("d", () => { + getFirst(player).x += 1; +}); + +afterInput(() => { + if (tilesWith(banana, player,).length >=1) { + getFirst(banana).remove(); + Points = Points + 1 + updatePoints() + placeRandomSprite(banana) + playTune(ding) + + } + +}) \ No newline at end of file