Example #1
0
 public static JeuVie GetInstance(int x, int y, int chance)
 {
     if (instance == null)
     {
         instance = new JeuVie(x, y, chance);
     }
     return(instance);
 }
Example #2
0
 public static JeuVie GetInstance()
 {
     if (instance == null)
     {
         instance = new JeuVie();
     }
     return(instance);
 }
Example #3
0
        static void Main(string[] args)
        {
            JeuVie JV = JeuVie.GetInstance(100, 30, 25);

            JV.VoirTransi = false;
            while (!JV.Stable)
            {
                Console.SetCursorPosition(0, 1);
                Console.WriteLine(JV.ToString());
                JV.FaireTransition();
                Thread.Sleep(50);
                //Console.ReadLine();
            }
            Console.WriteLine("EQUILIBRIUM!!!");
            Console.ReadLine();
        }