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


C# Planet.PlanetID方法代码示例

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


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

示例1: Fleet

        public Fleet(
            int owner,
            int numShips,
            Planet source,
            Planet dest,
            int totalTripLength,
            int turnsRemaining)
            : this(owner,
				numShips,
				source.PlanetID(),
				dest.PlanetID(),
				totalTripLength,
				turnsRemaining)
        {
        }
开发者ID:rhiensch,项目名称:pwbot,代码行数:15,代码来源:Fleet.cs

示例2: IssueOrder

 // Sends an order to the game engine. An order is composed of a source
 // planet number, a destination planet number, and a number of ships. A
 // few things to keep in mind:
 //   * you can issue many orders per turn if you like.
 //   * the planets are numbered starting at zero, not one.
 //   * you must own the source planet. If you break this rule, the game
 //     engine kicks your bot out of the game instantly.
 //   * you can't move more ships than are currently on the source planet.
 //   * the ships will take a few turns to reach their destination. Travel
 //     is not instant. See the Distance() function for more info.
 public void IssueOrder(Planet source, Planet dest, int numShips)
 {
     Console.WriteLine("" + source.PlanetID() + " " + dest.PlanetID() +
       " " + numShips);
     Console.Out.Flush();
 }
开发者ID:hquxmu,项目名称:ai-contest,代码行数:16,代码来源:PlanetWars.cs

示例3: IssueOrder

        // Sends an order to the game engine. An order is composed of a source
        // planet number, a destination planet number, and a number of ships. A
        // few things to keep in mind:
        //   * you can issue many orders per turn if you like.
        //   * the planets are numbered starting at zero, not one.
        //   * you must own the source planet. If you break this rule, the game
        //     engine kicks your bot out of the game instantly.
        //   * you can't move more ships than are currently on the source planet.
        //   * the ships will take a few turns to reach their destination. Travel
        //     is not instant. See the Distance() function for more info.
        public void IssueOrder(Planet source, Planet dest, int numShips)
        {
            string mesage = "" + source.PlanetID() + " " + dest.PlanetID() +
              " " + numShips;

            Console.WriteLine(mesage);
            Console.Out.Flush();
            if (Debugger != null)
            {
                Debugger.IssueOrder(mesage);
            }
        }
开发者ID:Eibwen,项目名称:Ai-Challenge-2010-PlanetWars,代码行数:22,代码来源:PlanetWars.cs

示例4: Move

 public Move(Planet source, Planet dest, int numShips)
     : this(source.PlanetID(), dest.PlanetID(), numShips)
 {
 }
开发者ID:rhiensch,项目名称:pwbot,代码行数:4,代码来源:Move.cs


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