Esempio n. 1
0
 public Game(int seed, Form window, Options options)
 {
     this.window = window;
     this.world = new World(seed, @"saves/save.csf");
     this.view = new View(window, this.world.GetPlayer());
     this.ui = new UI(this.world.GetPlayer());
     this.running = false;
     this.options = options;
 }
Esempio n. 2
0
 public Form1()
 {
     InitializeComponent();
     Init();
     this.options = Options.Load(properties);
     this.Visible = true;
     this.KeyPreview = true;
     this.KeyDown += Form1_KeyDown;
     this.KeyUp += Form1_KeyUp;
     this.FormClosing += Form1_Closing;
     this.inputQueue = new Queue<KeyEvent>();
     this.game = new Game(new Random().Next(), this, options);
     this.game.Run(BufferedGraphicsManager.Current.Allocate(CreateGraphics(), this.ClientRectangle), this.inputQueue);
     options.Save(properties);
     System.Environment.Exit(0);
 }