Beispiel #1
0
 public void Move() //Unfinished
 {
     for (int Steps = 0; Steps < Stats[0] + 2; Steps++)
     {
         if (PitchHandler.Pitch[Position[0], Position[1]].GetTackleZones(Team) > 0)
         {
             Console.WriteLine("Need to dodge");
             inTackleZone = true;
         }
         else
         {
             inTackleZone = false;
         }
         Console.WriteLine("Movement left: " + (Stats[0] - Steps));
         Console.WriteLine("Press Enter to end action");
         ConsoleKey input = Console.ReadKey().Key;
         if (input == ConsoleKey.Enter)
         {
             Used = true;
             return;
         }
         int[] movement = InputHandler.Move8(input);
         int[] newPos   = new int[] { Position[0] + movement[0], Position[1] + movement[1] };
         if (newPos[0] >= 0 && newPos[1] >= 0 && newPos[0] < PitchHandler.Pitch.GetLength(0) && newPos[1] < PitchHandler.Pitch.GetLength(1) && PitchHandler.Pitch[newPos[0], newPos[1]].StoredPlayer == null)
         {
             MovePlayerToTileAtPosition(new int[] { newPos[0], newPos[1] });
             Cursor.Position = new int[] { Position[0], Position[1] };
             if (inTackleZone && !DodgeRoll(PitchHandler.Pitch[Position[0], Position[1]].GetTackleZones(Team)))
             {
                 Proned = true;
                 TurnHandler.TurnOver();
                 return;
             }
             RenderHandler.RenderPitch();
         }
         else
         {
             Steps--;
             continue;
         }
     }
     Used = true;
 }
Beispiel #2
0
 static void Main(string[] args)
 {
     TurnHandler.initMatch();
     RenderHandler.RenderPitch();
 }