static void Main(string[] args)
        {
            Console.WriteLine("Tapez N pour l'exploration non informée ou I pour l'exploration informée : ");
            string input = "x";

            while ((input != "N" && input != "n" && input != "I" && input != "i"))
            {
                input = Console.ReadLine();
                Console.WriteLine("Mauvais choix");
            }

            Console.Clear();

            if (input == "N" || input == "n")
            {
                input = "n";
            }

            if (input == "I" || input == "i")
            {
                input = "i";
            }


            Manor manor = Manor.getInstance();

            manor.setAlive(input);
        }
Exemplo n.º 2
0
 // Create a instance of manor object if null and return manor
 public static Manor getInstance()
 {
     if (instance == null)
     {
         instance = new Manor();
     }
     return(instance);
 }
 public void execute(string action)
 {
     Manor.getInstance().pushEvent(action);
     actions[action].enact(Manor.getInstance().getFloor(), (int[])Manor.getInstance().getFloor().getAspXY().Clone());
 }
Exemplo n.º 4
0
 public int getAccount()
 {
     return(Manor.getInstance().getFloor().account());
 }
Exemplo n.º 5
0
 public int[,] getSurroundings()
 {
     return((int[, ])Manor.getInstance().getFloorState().Clone());
 }
Exemplo n.º 6
0
        static void Main(string[] args)
        {
            Manor manor = Manor.getInstance();

            manor.setAlive();
        }
Exemplo n.º 7
0
 // Get vacXY
 public int[] getVacXY()
 {
     return((int[])Manor.getInstance().getAspXY().Clone());
 }
Exemplo n.º 8
0
 // Execute an action and print it
 public void execute(string action)
 {
     Console.WriteLine("Actors are doing : " + action);
     actions[action].enact(Manor.getInstance().getFloor(), (int[])Manor.getInstance().getAspXY().Clone());
 }