当前位置: 首页>>代码示例>>C#>>正文


C# Team.addGladiatorToTeam方法代码示例

本文整理汇总了C#中Team.addGladiatorToTeam方法的典型用法代码示例。如果您正苦于以下问题:C# Team.addGladiatorToTeam方法的具体用法?C# Team.addGladiatorToTeam怎么用?C# Team.addGladiatorToTeam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Team的用法示例。


在下文中一共展示了Team.addGladiatorToTeam方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Main

        public static void Main(string[] args)
        {
            // instance Players Classes
            Player playerA = new Player("Player", "A", "Player A");
            Player playerB = new Player("Player", "B", "Player B");
            Player playerC = new Player("Player", "C", "Player C");
            Player playerD = new Player("Player", "D", "Player D");

            // instance Teams Classes
            Team teamA = new Team ("TeamA", "Best team ever");
            Team teamB = new Team ("TeamB", "Best team ever");
            Team teamC = new Team ("TeamC", "Best team ever");
            Team teamD = new Team ("TeamD", "Best team ever");

            Gladiator gladiatorA1 = new Gladiator ("Gladiator 1 Team A");
            Gladiator gladiatorA2 = new Gladiator ("Gladiator 2 Team A");
            Gladiator gladiatorA3 = new Gladiator ("Gladiator 3 Team A");

            Gladiator gladiatorB1 = new Gladiator ("Gladiator 1 Team A");
            Gladiator gladiatorB2 = new Gladiator ("Gladiator 2 Team A");
            Gladiator gladiatorB3 = new Gladiator ("Gladiator 3 Team A");

            Gladiator gladiatorC1 = new Gladiator ("Gladiator 1 Team A");
            Gladiator gladiatorC2 = new Gladiator ("Gladiator 2 Team A");
            Gladiator gladiatorC3 = new Gladiator ("Gladiator 3 Team A");

            Gladiator gladiatorD1 = new Gladiator ("Gladiator 1 Team A");
            Gladiator gladiatorD2 = new Gladiator ("Gladiator 2 Team A");
            Gladiator gladiatorD3 = new Gladiator ("Gladiator 3 Team A");

            teamA.addGladiatorToTeam (gladiatorA1);
            teamA.addGladiatorToTeam (gladiatorA2);
            teamA.addGladiatorToTeam (gladiatorA3);

            teamB.addGladiatorToTeam (gladiatorB1);
            teamB.addGladiatorToTeam (gladiatorB2);
            teamB.addGladiatorToTeam (gladiatorB3);

            teamC.addGladiatorToTeam (gladiatorC1);
            teamC.addGladiatorToTeam (gladiatorC2);
            teamC.addGladiatorToTeam (gladiatorC3);

            teamD.addGladiatorToTeam (gladiatorD1);
            teamD.addGladiatorToTeam (gladiatorD2);
            teamD.addGladiatorToTeam (gladiatorD3);

            playerA.addTeamToPlayerTeamList(teamA);
            playerB.addTeamToPlayerTeamList(teamB);
            playerC.addTeamToPlayerTeamList(teamC);
            playerD.addTeamToPlayerTeamList(teamD);

            Stuff dague = Stuff.getDagueInstance ();
            Stuff bouclier = Stuff.getBouclierRectangulaireInstance ();
            gladiatorA1.addEquipementToGladiatorStuff (dague);
            gladiatorA1.addEquipementToGladiatorStuff (bouclier);
        }
开发者ID:morpheus93,项目名称:gladiatorsGame,代码行数:56,代码来源:Program.cs


注:本文中的Team.addGladiatorToTeam方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。