# Snake

URL: https://zerodev.ca/docs/medusa/modules/snake

> A word chain game where each word starts with the last letter of the one before.



Members build a chain of words in a snake channel. Each word must start with the last letter of the previous word, such as `apple`, `eagle`, `elephant`. Every channel keeps its own chain and record.

## Rules

* A word must start with the last letter of the previous word.
* Words use letters only and must be at least **Minimum Word Length** long.
* With **Allow Duplicate Words** off, a word cannot be used twice in one chain.
* With **Allow Consecutive Submissions** off, the same member cannot play twice in a row.
* Valid words get the success reaction. A new record posts a message.

## Mistakes

A broken rule gets the failure reaction and then the **Failure Action**:

| Action                 | What happens                                     |
| ---------------------- | ------------------------------------------------ |
| Reset Chain to Start   | The chain starts over.                           |
| Delete Invalid Message | The message is deleted and the chain carries on. |
| Warn Player Only       | The member is warned and the chain carries on.   |

## Settings

| Setting                       | Default              | What it does                                     |
| ----------------------------- | -------------------- | ------------------------------------------------ |
| Enable Snake Game             | On                   | Turns the game on or off.                        |
| Snake Channels                | None                 | Channels that run a game.                        |
| Minimum Word Length           | 3                    | Shortest word allowed.                           |
| Allow Duplicate Words         | Off                  | Lets a word repeat in one chain.                 |
| Allow Consecutive Submissions | Off                  | Lets one member play twice in a row.             |
| Failure Action                | Reset Chain to Start | What a mistake does.                             |
| Success Reaction Emoji        | Snake                | Reaction on a valid word.                        |
| Failure Reaction Emoji        | Cross                | Reaction on a mistake.                           |
| Update Channel Topic          | On                   | Shows the chain and record in the channel topic. |

## Commands

| Command                  | What it does                                                               |
| ------------------------ | -------------------------------------------------------------------------- |
| `/snake current`         | Show the last word, the next letter and the record.                        |
| `/snake reset [channel]` | Reset a channel's chain. Needs &#x2A;*Snake ( Manage )** or Administrator. |

The **Snake Events** log records broken chains and new records.
