-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGameManager.cs
More file actions
58 lines (50 loc) · 1.72 KB
/
Copy pathGameManager.cs
File metadata and controls
58 lines (50 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Spectre.Console;
namespace MazeRunners
{
public class Program
{
public static void Main(string[] args)
{
GameManager gameManager = new GameManager();
gameManager.StartGame();
}
}
public class GameManager
{
public List<Jugador> jugadores = new List<Jugador>();
public int current;
public void StartGame()
{
Console.WriteLine
(" Bienvenido al MazeRunners \n Este es un prototipo de juego de laberinto en consola \n Las instrucciones se encuentran en el README \n Disfruta del juego");
Console.WriteLine(" Toque cualquier tecla para comenzar");
Console.ReadLine();
Console.WriteLine("Elige a los jugadores\n");
UsefullMethods methods = new UsefullMethods(jugadores);
while(true)
{
methods.ElegirJugadores();
while(true)
{
methods.DisplayMaze();
Console.WriteLine();
methods.ShowPlayer();
methods.HandleInput(jugadores[current].Speed);
if (methods.CheckWin())
{
Console.Clear();
AnsiConsole.Markup($"[green] Felicidades! El jugador {current + 1} llego al final del laberinto.[/]");
break;
}
Console.WriteLine("Si terminaste el turno pulsa Enter");
Console.ReadLine();
methods.SwitchTurn();
}
}
}
}
}