示例#1
0
        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;
        }
示例#2
0
        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();
            }
        }
示例#3
0
 public TreIRadBot(TreIRadSpel spel)
 {
     this.spel = spel;
     egetSpel  = new TreIRadSpel(spel.storlek, spel.antalFörVinst);
 }