public void kopieraAnnatSpel(TreIRadSpel spel) { if (spel.storlek != storlek) //Om spel har olika storlekar avbryts kopieringen { return; } kopieraBräda(spel.bräda); tur = spel.tur; väntandeSpelare = spel.väntandeSpelare; }
public Spelplan(bool spelarMotBot, int storlek, int mål) { InitializeComponent(); bool botBörjar = false; //Kan användas fall man vill bot ska börja spel = new TreIRadSpel(storlek, mål); bot = new TreIRadBot(spel); this.spelarMotBot = spelarMotBot; antalTillgängligaDrag = storlek * storlek; görKnappar(); if (spelarMotBot && botBörjar) { görBotDrag(); } }
public TreIRadBot(TreIRadSpel spel) { this.spel = spel; egetSpel = new TreIRadSpel(spel.storlek, spel.antalFörVinst); }