Ejemplo n.º 1
0
 public Display(Game game)
 {
     parentGame = game;
     baseBoard = new Board();
     InitializeCardImageMap();
     InitializeComponent();
 }
Ejemplo n.º 2
0
 private void loadOne_Click(object sender, EventArgs e)
 {
     String location = Application.StartupPath;
     String filename = "save1.txt";
     String pathString = System.IO.Path.Combine(location, filename);
     //MessageBox.Show(pathString);
     if (System.IO.File.Exists(pathString))
     {
         System.IO.StreamReader sw = new System.IO.StreamReader(pathString);
         int newTheme = int.Parse(sw.ReadLine());
         MessageBox.Show("Game successfully loaded from " + pathString);
         this.Hide();
         var game = new Game(newTheme);
         game.GameBegin();
     }
     else
     {
         MessageBox.Show("No save file exists in " + pathString);
     }
 }
Ejemplo n.º 3
0
 private void button1_Click(object sender, EventArgs e)
 {
     this.Hide();
     var game = new Game();
     game.GameBegin();
 }