Esempio n. 1
0
        public Game(int numPlayers, string difficulty, List<string> playernames)
        {
            //Set class values from parameters.
            this.numPlayers = numPlayers;
            this.difficulty = difficulty;
            this.playernames = playernames;

            MainForm MainForm = new MainForm(this);
            this.FormName = MainForm.Name;
            this.CurrentForm = MainForm;
            this.CurrentForm.Show();
        }
Esempio n. 2
0
        public Player(int playernum, string playername, Engine engine, MainForm CurrentForm)
        {
            this.playernum = playernum;
            this.playername = playername;
            this.engine = engine;
            this.CurrentForm = CurrentForm;

            switch (playernum)
            {
                case 1:
                    {
                        this.lblCoal = CurrentForm.lblPlayer1Coal;
                        this.lblWater = CurrentForm.lblPlayer1Water;
                        this.lblGadget1 = CurrentForm.lblPlayer1Gadget1;
                        this.lblGadget2 = CurrentForm.lblPlayer1Gadget2;
                        this.icon = CurrentForm.pbPlayer1Ability;
                        break;
                    }
                case 2:
                    {
                        this.lblCoal = CurrentForm.lblPlayer2Coal;
                        this.lblWater = CurrentForm.lblPlayer2Water;
                        this.lblGadget1 = CurrentForm.lblPlayer2Gadget1;
                        this.lblGadget2 = CurrentForm.lblPlayer2Gadget2;
                        this.icon = CurrentForm.pbPlayer2Ability;
                        break;
                    }
                case 3:
                    {
                        this.lblCoal = CurrentForm.lblPlayer3Coal;
                        this.lblWater = CurrentForm.lblPlayer3Water;
                        this.lblGadget1 = CurrentForm.lblPlayer3Gadget1;
                        this.lblGadget2 = CurrentForm.lblPlayer3Gadget2;
                        this.icon = CurrentForm.pbPlayer3Ability;
                        break;
                    }
                case 4:
                    {
                        this.lblCoal = CurrentForm.lblPlayer4Coal;
                        this.lblWater = CurrentForm.lblPlayer4Water;
                        this.lblGadget1 = CurrentForm.lblPlayer4Gadget1;
                        this.lblGadget2 = CurrentForm.lblPlayer4Gadget2;
                        this.icon = CurrentForm.pbPlayer4Ability;
                        break;
                    }
            }
        }
Esempio n. 3
0
 public EventDispatcher(int numPlayers, Board gameBoard, MainForm currentForm)
 {
     this.numPlayers = numPlayers;
     this.GameBoard = gameBoard;
     this.CurrentForm = currentForm;
 }