Skip to content

mossr/Snake.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake.jl

The game of snake in the Julia REPL. 🟩🟩🟩🟩🟩     🍎

Modified from Chris DeLeon's 4:30 minute Javascript version.

Installation

] add Snake

Gameplay

using Snake

The game will start automatically.

  • Hit backtick to pause the game.
  • Resume with play() or restart the game with restart()

Controls (wasd)

  • a and d to apply left and right velocity
  • s to apply down velocity
  • w to apply up velocity
  • backtick to pause, then play() to resume

Emoji support

To play using emojis, run:

play(emoji=true)

Other options

  • play(walls=true): Restart the game when hitting walls (default false)
  • play(size=(20,20)): Change game field dimensions (default (20,20))

Robert Moss