fraktalsyndrom / AAAH-SNAYKUU

An engine/API for programming (and battling) Snake bots in Java!
GNU General Public License v3.0
14 stars 10 forks source link

How to determine starting locations of snakes? #2

Closed fraktalsyndrom closed 12 years ago

fraktalsyndrom commented 13 years ago

An algorithm for this is needed. Do we want them to spawn in fixed locations, or should it be random? Is there a maximum limit to the number of players?

Take a look at this illustration of a board below (X represents empty square, numbers each represent a snake). This could easily be extended to accommodate for more players, as long as the board size is increased.

X X X X X X X X 3 X X X 2 X X X X X X X X X X X X X X X X 1 X X X 4 X X X X X X X X

fraktalsyndrom commented 12 years ago

solved beautifully by Erik.