## Game

### Rules

This snake can only grow by eating prime number apples.

Eating a nonprime number apple will shrink it!

Guide it with the arrows on your keyboard.

### Tips

A prime number is an integer greater than 1 that is a multiple of only 1 and itself.

For example, 2, 3, 5, 7 and 11 are prime, but 15 is not prime because it is a multiple of 3 and 5.

An even number is a multiple of 2.

If the last digit of a number is 5 or 0, then this number is a multiple of 5.

If the sum of the digits of a number is a multiple of 3, then this number is a multiple of 3, and consequently not prime.
For example 123 is a multiple of 3 because 1 + 2 + 3 = 6 is a multiple of 3.

You can find those rules and more here: https://en.wikipedia.org/wiki/Divisibility_rule, or you can learn all the prime numbers between 2 and 1000. ;-)

## Credits

Prime snake was created by AndrĂ© Harnist and Megan Cook.

We used the game framework Phaser 3, a very good way to implement games on websites.

We took inspiration from the snake phaser 3 example.

### Motivation

We wanted to create a simple game that is both math-oriented and entertaining.

A prime number is an integer greater than 1 that has no positive divisors other than 1 and itself.

This game tests the use of simple rules to quickly find if a number is prime or composite.

### Contact

A suggestion for improvement, a bug to report?

Do not hesitate to contact us: andre.harnist@inria.fr