snake
diff engine.py @ 147:16bb633dc352
Automated merge with ssh://kodomo.fbb.msu.ru/snake
author | Alex Martynov <martiran@kodomo.fbb.msu.ru> |
---|---|
date | Mon, 20 Dec 2010 17:57:07 +0300 |
parents | 8b5bc7bda225 |
children | 382ab7b65331 |
line diff
1.1 --- a/engine.py Mon Dec 20 17:55:40 2010 +0300 1.2 +++ b/engine.py Mon Dec 20 17:57:07 2010 +0300 1.3 @@ -176,12 +176,13 @@ 1.4 def create_snake(self, snake_number): 1.5 """Create the snake: 1.6 position choice is based on number or placement of 'Load' button 1.7 + snakes are placed with tails turned to the wall. 1.8 color is chosen accorting to fen shui tradition""" 1.9 cells_id = [] 1.10 f_h = self.field.h 1.11 f_w = self.field.w 1.12 for y in range(self.start_snake_length): 1.13 - cells_id.append(((f_w-1)/2, y+1)) 1.14 + cells_id.insert(0,((f_w-1)/2, y+1)) 1.15 for rot_num in range(snake_number - 1): 1.16 for i, cell in enumerate(cells_id): 1.17 cells_id[i] = (min(f_h, f_w)-1-cell[1],cell[0])