Example #1
0
 //Constructor
 //callback: Method which outputs data to the text area
 public Discorgimon(DiscorgimonOutputCallback callback)
 {
     outputCallbackMethod = callback;
     programRunning       = true;
     players       = new List <Discorgi>();
     random        = new Random();
     threadCounter = 0;
 }
Example #2
0
        static void Main(string[] args)
        {
            DiscorgimonOutputCallback discorgimonOutput = new DiscorgimonOutputCallback(Output);
            Discorgimon discorgimon       = new Discorgimon(discorgimonOutput);
            Thread      discorgimonThread = new Thread(new ThreadStart(discorgimon.Begin));

            discorgimonThread.Start();

            do
            {
                discorgimon.Input("Josh", Console.ReadLine());
            } while (discorgimon.programRunning);
        }