Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def is_point_in_snake(point, snake):
- point_belongs_to_snake = point == snake[0]
- point_belongs_to_snake = point_belongs_to_snake or point == snake[1]
- point_belongs_to_snake = point_belongs_to_snake or point == snake[2]
- point_belongs_to_snake = point_belongs_to_snake or point == snake[3]
- return point_belongs_to_snake
Advertisement
Add Comment
Please, Sign In to add comment