Poison Mode

## Overview

Poison mode is a mode where there are two fruits, a regular fruit, and a gray version of that fruit. Eating a normal fruit will increase the player's score by one and spawn a new normal fruit. It will also remove the gray fruit and spawn a new gray fruit (if possible).

### Eating a gray fruit

Eating a gray fruit will not increase the player's score. Instead, the player will lose control of the snake and the snake will turn in random directions. The gray poisoned snake will always turn as long as there is an empty square. The poisoned snake actively avoids apples, itself, and the border.

The amount of time the snake is poisoned depends on the length of snake, as expressed by this function: poisonTicks = Math.max(8, Math.floor(snake.length \* 2 / 3)); Essentially, if the snake is less than fourteen squares long, it will remain poisoned for eight squares. If the length of the snake is greater than or equal to fourteen, the snake remains poisoned for the number of squares 2/3s its length. Any decimal value is truncated.

### Spawning a gray fruit

After the player eats a normal fruit, it first removes a gray fruit and then spawns a normal fruit in any unoccupied square. Next, the game spawns a gray fruit as long as there is an empty square outside the spawn radius. The spawn radius is taxicab three from the snake's head. In taxicab geometry, the vertical and horizontal distances are added. For example, a gray fruit could not spawn two squares to the left and one square down from the snake's head. This is because it is 2 + 1 squares away, which is less than or equal to three.

### Poison and multi mode

When the game setting is set to one apple, a skilled player can consistently get the maximum possible score (87 on small, 252 on standard, 501 on large). However, when the apple count setting is set to three or five, it becomes significantly harder. The snake might be forced to eat gray apples, which means the player will have to coil in a pattern that will not kill the snake when it eats a gray apple, and successfully recover from being poisoned. Additionally, the amount of RNG required increases as the apple count increases.

## Trivia

Poison mode was released on December 7th, 2021.

The spawn radius was originally taxicab two + taxicab three in a straight line. However, that was changed due to unfair spawns.

Poison mode is called "POISON" in the source code.

When this mode originally came out, it was possible to win without filling the entire board, new apples wouldn't attempt to spawn where poison apples were in the past. Yarmiplay suggested to CLTincknell that this doesn't have to be the case, because of that the game was changed to force the player into filling the entire board in order to win. However, this change in Multi settings 3a and 5a was not what Yarmiplay had intended, since winning during the end-game became very RNG based, poisons wouldn't despawn until there were more of them compared to normal fruit, which increased the difficulty immensely.

Later on in 26.4.2022, a community poll was conducted with 3 options:

* Leave the game as it is (3 votes)
* Revert the changes and allow less than full-board wins (0 votes)
* Fruit have priority over poisons during the end-game, making it easier. (20 votes)
* Change something else - option for anyone with a unique idea (0 votes) CLTincknell listened to the poll and thus the game has reached it's current state

## Gallery

M4xD's poison 5a first recorded sub 1:00 !!!!!!!!!!!!!!!!M4xD's poison 3a first recorded 1:21M4xD's Poison small 1a all apples 2:04The gray poisoned snake after eating a gray apple in Poison Mode