Skip to content
Micah Mundy edited this page May 27, 2017 · 2 revisions

These rules apply to any standard SnakeServer. Rules may change for modified servers.


Definitions:

  • LocI-a LOCation Integer, composed of an x-value and a y-value.
  • Snake-a programmed player comprised of multiple segments, or LocIs, that follow each other.
  • Head (of a snake)-the segment of a snake that leads the rest of the segments of the snake
  • Tail (of a snake)-the segment of a snake that follows every other segment.
  • Fruit-A magenta segment that allows snakes to increase in size if eated
  • Wall-a piece that kills snakes upon collision
  • Arena-the area in which all snakes compete and contains snakes, walls, and fruit.

Goal: Grow larger than anyone else.

Rules:

  1. All snakes can only move left, right, up or down.
  2. If a snake tells the server to move anywhere other than up, down, left, or right, it dies.
  3. All snakes move at the same time
  4. All snakes plan their next moves simultaneously
  5. If a snake moves and its head is in the same position as a wall, the snake dies.
  6. If a snake moves and its head is in the same position as another snake segment, the snake dies.
  7. If the heads of two snakes collide, the snake with the lowest ID dies.
  8. If a snake moves and its head is in the same position as a fruit, the snake grows, i.e. its size increases by one and it contains an additional segment located in its tail.

Clone this wiki locally