예제 #1
0
파일: hero.py 프로젝트: wannadie/ideaman
 def update_child(self, matrix):
     next_step = mul_tuple(self.direction, self.speed)
     next_screen_position = next_point(self.screen_position, next_step)
     x, y = s2c(next_screen_position)
     if x >= X_CELL_NUM or x < 0 or y >= Y_CELL_NUM or y < 0 or not matrix[y][x]:
         # self.direction = STOP
         self.direction = TRIGONOMETRY_SUCKS[self.direction]["contr"]