DEV Community

Anurag Rana
Anurag Rana

Posted on

12 9

Classic snake game in Linux terminal

You must have played the classic snake game on feature phones like Nokia 1100.

Now you can again play the same game in Linux terminal.

For this, you need to install nsnake package by running below command in terminal.



sudo apt-get install nsnake


Enter fullscreen mode Exit fullscreen mode

After the package is installed, run the game by running nsnake command.

Use the up and down arrow keys to change to game mode to Borders On and Borders Off.

Use left and right arrow keys to change the speed.

Press enter or space to start the game once you are done with settings.

You can exit the game by pressing q key.

Rules are the same as they were in the classic game.

If you collide with yourself (snake), you die. Game over.

Download the latest version of this game from Github.

More from Author:

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (2)

Collapse
 
anpos231 profile image
anpos231

Snake is my favourite game. I think I once made a replica in almost anything you can make it on.

Collapse
 
devhammed profile image
Hammed Oyedele

Nice, but the initial speed is very slow...can you please improve it?

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs