Snake.jl

The game of snake in the Julia REPL
Author mossr
Popularity
6 Stars
Updated Last
3 Months Ago
Started In
October 2020

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