dbu/snake-bundle

Snake Game (demo for the Symfony 5.1 console)

Installs: 153

Dependents: 0

Suggesters: 0

Security: 0

Stars: 118

Watchers: 3

Forks: 9

Open Issues: 0

Type:bundle

1.0.0 2020-06-02 08:53 UTC

This package is auto-updated.

Last update: 2021-08-30 12:10:13 UTC


README

                             /^\/^\
                           _|__|  O|
                  \/     /~     \_/ \
                   \____|__________/  \
                         \_______      \
                                 `\     \                    \
                                  |     |                     \
 ____              _             /     /                       \
/ ___| _ __   __ _| | _____     /     /                         \\
\___ \| '_ \ / _` | |/ / _ \   /     /                           \ \
 ___) | | | | (_| |   <  __/  /     /                             \  \
|____/|_| |_|\__,_|_|\_\___| /     /             _----_            \   \
                            /     /           _-~      ~-_         |   |
                           (      (        _-~    _--_    ~-_     _/   |
                            \      ~-____-~    _-~    ~-_    ~-_-~    /
                              ~-_           _-~          ~-_       _-~   - jurcy -
                                 ~--______-~                ~-___-~

This bundle adds a command to run the snake game in your console. It is a demo for the cursor added in Symfony Console 5.1. Let it not distract you from your work ;-)

Installation and Usage

Installation

composer require dbu/snake-bundle

Run

bin/console game:snake

Development

Clone the git repository, then run:

composer install
./tests/fixtures/app/bin/console game:snake

FAQ

My console is looking weird after running the command

This can happen after aborting the program, e.g. with -c. Reset the console to sane defaults by typing:

stty sane

Be aware that input is probably hidden, so you won't see anything until you hit enter.

Why Snake?

Because it was the first thing I could think of. And its simple enough that it should be possible to follow what is going on.

What is this font?

Delta Corps Priest 1 from http://patorjk.com/software/taag/

Screenshots

start screen

lost game