Ejemplo n.º 1
0
 public Spel(Speler speler1, Speler speler2, int startscore, int botGmd, bool einde)
 {
     this.Speler1 = speler1;
     this.Speler2 = speler2;
     this.Startscore = startscore;
     this.BotGmd = botGmd;
     this.Einde = einde;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Systeem maakt nieuw spel aan aan de hand van de gegevens die de gebruiker heeft meegegeven.
        /// Indien er een bot is ingesteld wordt het spelerstype hieraan aangepast.
        /// </summary>
        /// <param name="speler1"></param>
        /// <param name="speler2"></param>
        /// <param name="score"></param>
        /// <param name="legsTotaal"></param>
        /// <param name="setsTotaal"></param>
        /// <param name="botGmd"></param>
        /// <returns></returns>
        public bool NieuwSpel(string speler1, string speler2, int score, int legsTotaal, int setsTotaal, int botGmd)
        {
            Speler sp1 = new Speler(SpelerType.Gebruiker, speler1, score, 0, 0, 0,0,0);

            SpelerType st;
            if (speler2 == "Bot")
            {
                st = SpelerType.Bot;
            }
            else
            {
                st = SpelerType.Gebruiker;
            }
            Speler sp2 = new Speler(st, speler2, score, 0, 0, 0,0,0);

            Spel spel = new Spel(sp1, sp2, score, botGmd, false);
            Legs leg = new Legs(sp1, sp2, score, botGmd, false, legsTotaal);
            Sets set = new Sets(sp1, sp2, score, botGmd, false, setsTotaal);
            Statistieken stat1 = new Statistieken(speler1, "", 0, 0, 0, 0, 0, 0, 0, 0);
            Statistieken stat2 = new Statistieken(speler2, "", 0, 0, 0, 0, 0, 0, 0, 0);

            statistieken.Add(stat1);
            statistieken.Add(stat2);
            spellen.Add(spel);
            legs.Add(leg);
            sets.Add(set);
            return true;
        }
Ejemplo n.º 3
0
 public Sets(Speler speler1, Speler speler2, int startScore, int botGmd, bool einde, int setsTotaal)
     : base(speler1, speler2, startScore, botGmd, einde)
 {
     this.SetsTotaal = setsTotaal;
 }
Ejemplo n.º 4
0
 public Legs(Speler speler1, Speler speler2, int startScore, int botGmd, bool einde, int legsTotaal)
     : base(speler1, speler2, startScore, botGmd, einde)
 {
     this.LegsTotaal = legsTotaal;
 }
Ejemplo n.º 5
0
 public Sets(Speler speler1, Speler speler2, int startScore, int botGmd, bool einde, int setsTotaal)
     : base(speler1, speler2, startScore, botGmd, einde)
 {
     this.SetsTotaal = setsTotaal;
 }
Ejemplo n.º 6
0
 public Legs(Speler speler1, Speler speler2, int startScore, int botGmd, bool einde, int legsTotaal)
     : base(speler1, speler2, startScore, botGmd, einde)
 {
     this.LegsTotaal = legsTotaal;
 }