コード例 #1
0
ファイル: Game.cs プロジェクト: roric32/inferno
        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();
        }
コード例 #2
0
ファイル: Player.cs プロジェクト: roric32/inferno
        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;
                    }
            }
        }
コード例 #3
0
ファイル: EventDispatcher.cs プロジェクト: roric32/inferno
 public EventDispatcher(int numPlayers, Board gameBoard, MainForm currentForm)
 {
     this.numPlayers = numPlayers;
     this.GameBoard = gameBoard;
     this.CurrentForm = currentForm;
 }