Skip to content

Instantly share code, notes, and snippets.

@Alldaron
Alldaron / README.md
Created June 3, 2023 08:31 — forked from straker/README.md
Basic Snake HTML and JavaScript Game

Basic Snake HTML and JavaScript Game

Snake is a fun game to make as it doesn't require a lot of code (less than 100 lines with all comments removed). This is a basic implementation of the snake game, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Score
  • When the snake eats an apple, the score should increase by one. Use context.fillText() to display the score to the screen
@Alldaron
Alldaron / README.md
Created June 3, 2023 08:30 — forked from straker/README.md
Basic Tetris HTML and JavaScript Game

Basic Tetris HTML and JavaScript Game

This is a basic implementation of the game Tetris, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

-- user input
set textFile to "" -- ex. "/Volumes/Data/A/file.txt"
set des1 to "" -- ex. "/Volumes/Data/A/folder"
-- end of user input
set textFilep to POSIX file textFile
set textFileRead to paragraphs of (read of textFilep)
set des1p to POSIX file des1
tell application "Finder"
open des1p
activate