示例#1
0
 public bool ObstacleUp(Snake snake, Map map)
 {
     return(snake.HeadDistanceFromTop == 1);
 }
示例#2
0
 public bool ObstacleDown(Snake snake, Map map)
 {
     return(snake.HeadDistanceFromTop == map.Height - 1);
 }
示例#3
0
 public bool ObstacleLeft(Snake snake, Map map)
 {
     return(snake.HeadDistanceFromLeft == 1);
 }
示例#4
0
 public bool ObstacleRight(Snake snake, Map map)
 {
     return(snake.HeadDistanceFromLeft == map.Width - 1);
 }