Exemple #1
0
        static void Main()
        {
            String DictionaryFile = @"..\..\Slowa.txt";

            Encoding.Encoding DictionaryEncoding = new Encoding.Polish();
            Dictionary.Dictionary D = new Dictionary.TrieDictionary(DictionaryFile, DictionaryEncoding);
            Language.Language Language = new Polish();
            //Dictionary.Benchmark.Benchmark1(D);

            //Console.Read();
            D.Reload();
            BlockingCollection<ApplicationEvent> ViewEvents = new BlockingCollection<ApplicationEvent>();
            Model.Model GameModel = new Model.Model(D, Language);
            //GameForm GameForm = new GameForm();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            GameForm GameForm = new GameForm(ViewEvents);
            GameController = new Controller.Controller(GameModel, GameForm, ViewEvents);

            GameController.AddStrategies();
            ThreadStart childref = new ThreadStart(ControllerThread);
            Thread childThread = new Thread(childref);
            childThread.Start();

            Application.Run(GameForm); //TODO use GameForm implemented above

            GameController.Start();
        }
Exemple #2
0
 public Controller(Model.Model Model, GameForm GameForm, BlockingCollection<ApplicationEvent> ViewEvents)
 {
     this.GameModel = Model;
     this.GameForm = GameForm;
     this.ViewEvents = ViewEvents;
     this.Strategies = new Dictionary<System.Type, Strategy>();
 }