Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/snake/annotate/f1a508e855ce/engine.py
Дата изменения: Unknown
Дата индексирования: Fri Feb 28 22:59:10 2014
Кодировка:
snake: engine.py annotate

snake

annotate engine.py @ 5:f1a508e855ce

correct
author Alex Martynov <martiran@kodomo.fbb.msu.ru>
date Wed, 08 Dec 2010 03:09:10 +0300
parents 597c0ddea0ab
children 5873301dc558
rev   line source
martiran@1 1 class Cell(object):
martiran@1 2 def __init__(self, x, y, canvas):
martiran@5 3 self.x = x
martiran@5 4 self.y = y
martiran@1 5 self.canvas = canvas
martiran@1 6 self.snake = None
martiran@1 7 self.type = empty
martiran@1 8 return
martiran@1 9 def redraw(w, h):
martiran@1 10 pass
martiran@5 11 def __eq__(pattern):
martiran@1 12 pass
martiran@5 13 def clear():
martiran@1 14 self.snake = None
martiran@5 15 self.type = 'empty'
martiran@1 16 return
martiran@1 17
martiran@1 18
martiran@1 19 class Engine(object):
martiran@2 20 def __init__(canvas, w, h, snake_amount):
martiran@5 21 self.canvas = canvas
martiran@5 22 self.w = w
martiran@1 23 self.h = h
martiran@1 24 self.snake_amount = snake_amount
martiran@1 25 self.snakes = []
martiran@1 26 self.field = []
martiran@1 27 return
martiran@5 28 def step():
martiran@1 29 pass
martiran@1 30 def move_snake():
martiran@1 31 pass
martiran@1 32 def create_snake(snake_number):
martiran@1 33 pass
martiran@5 34 def refill():
martiran@1 35 pass
martiran@1 36 def redraw(w,h):
martiran@1 37 pass
martiran@5 38 def legal_moves(snake):
martiran@1 39 pass
martiran@5 40