snake
diff snake.py @ 50:e1cfe742dda8
Automated merge with ssh://kodomo/snake
author | Daniil Alexeyevsky <me.dendik@gmail.com> |
---|---|
date | Sun, 19 Dec 2010 23:31:56 +0300 |
parents | acaa43cb15ad |
children | 995c5300f498 |
line diff
1.1 --- a/snake.py Sun Dec 19 23:26:50 2010 +0300 1.2 +++ b/snake.py Sun Dec 19 23:31:56 2010 +0300 1.3 @@ -105,7 +105,7 @@ 1.4 """True if the rule applies in the field at position (x,y).""" 1.5 for px, fx in zip(range(7), range(x - 3, x + 4)): 1.6 for py, fy in zip(range(7), range(y - 3, y + 4)): 1.7 - if fx, fy in field: 1.8 + if (fx, fy) in field: 1.9 if field[fx, fy] != self.pattern[px, py]: 1.10 return False 1.11 else: