Example #1
0
        static void Main()
        {
            Spielfeld feld = new Spielfeld();

            Application.Run(feld);

            // Console.WriteLine(ImportHelper.GetGast("Marco Polo").beruf);
        }
Example #2
0
 public Steuerung(Spielfeld spielfeld)
 {
     importExportHelper = ImportExportHelper.getImportExportHelper();
     dar            = new Darstellung(spielfeld.CreateGraphics());
     this.spielfeld = spielfeld;
     dar.ResizeGameField(spielfeld, importExportHelper.GetRaum());
     statistik = new Statistik();
 }
Example #3
0
 public void ResizeGameField(Spielfeld spielfeld, Tuple <int, int> raum)
 {
     //Passe Form auf Spielfeldgröße an
     gameWidth  = raum.Item1;
     gameHeight = raum.Item2;
     if (CalculateWidth() > FORMWIDTH)
     {
         spielfeld.Size = new Size(CalculateWidth(), FORMHEIGHT);
         if (CalculateHeight() > FORMHEIGHT)
         {
             spielfeld.Size = new Size(CalculateWidth(), CalculateHeight());
         }
     }
     else
     {
         spielfeld.Size = new Size(FORMWIDTH, FORMHEIGHT);
         if (CalculateHeight() > FORMHEIGHT)
         {
             spielfeld.Size = new Size(FORMWIDTH, CalculateHeight());
         }
     }
     statistikPosition = new Point(CalculateWidth() - STATISTIKWIDTH + 50, 10);
     g = spielfeld.CreateGraphics();
 }