It's been a while since a contest has been posted. Here's a fairly simple one.
Write a function that can play Snake Numbers, leaving the fewest number of squares. The rules for Snake Numbers are simple:
- The board is an 18x18 square of numbers ranging from 1-6. There are 5 bombs randomly placed on the board. The starting location is random on each board.
- The object is to eliminate as many squares as possible by travelling over them.
- On each turn, the snake head must go in one of eight directions (any of the cardinal or ordinal directions). The snake head travels a number spaces equal to the value of the square adjacent to the snake head in the chosen direction. The snake leaves a tail behind on all squares travelled over.
- If the snake travels over a bomb, its tail, or one of the sides of the board, the game is over.
Before I start spouting off stuff about entries and judging, is there any interest in this contest?
See rules below.[/edit]