~snakes-game/snakes-game/trunk

« back to all changes in this revision

Viewing changes to snakes

  • Committer: Josh Brown
  • Date: 2010-09-05 17:07:00 UTC
  • Revision ID: joshbrown15@gmail.com-20100905170700-9qyi3gocb66nc7mb
Remove debug messages

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
 
52
52
    def update(self, direction=None):
53
53
        if type(direction[0]) is int and type(direction[1]) is int: self.direction = direction
54
 
        self.screen.addstr(0, 0, str(self.direction))
55
 
        self.screen.addstr(1, 0, str(self.pos))
56
54
        Cell.update(self, (self.pos[0] + self.direction[0], self.pos[1] + self.direction[1]))
57
55
 
58
56
class Snake(object):
64
62
    def update(self, direction=None):
65
63
        self.body[0].update(direction)
66
64
        for i in range(1, len(self.body)):
67
 
            self.screen.addstr(3, 0, str(i))
68
65
            self.body[i].update(self.body[i-1].old_pos)
69
66
        self._collisions()
70
67