Пример #1
0
 bool UpdateHeadPos(Vector2 head_pos)
 {
     if (head_pos != null)
     {
         MoveCursor(head_pos);
         Util.SetColor(headColor);
         Console.Write(head);
         if (map[head_pos.x, head_pos.y])
         {
             if (!lizardTail)
             {
                 GameOver();
                 return(true);
             }
             else
             {
                 snake.ChopTail(head_pos, TailChopEvent);
                 MoveCursor(head_pos);
                 Util.SetColor(headColor);
                 Console.Write(head);
             }
         }
         map[head_pos.x, head_pos.y] = true;
     }
     return(false);
 }