本文整理汇总了C#中Planet.PlanetId方法的典型用法代码示例。如果您正苦于以下问题:C# Planet.PlanetId方法的具体用法?C# Planet.PlanetId怎么用?C# Planet.PlanetId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Planet
的用法示例。
在下文中一共展示了Planet.PlanetId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MuteerMijnPlaneet
internal List<Planet> MuteerMijnPlaneet(Planet myPlanet, int strength)
{
int index = MijnPlaneten.FindIndex(c => c.PlanetId() == myPlanet.PlanetId());
MijnPlaneten[index].Sterkte -= strength;
return MijnPlaneten;
}
示例2: MuteerDoelPlaneten
internal List<Planet> MuteerDoelPlaneten(Planet target)
{
int index = NietMijnPlaneten.FindIndex(c => c.PlanetId() == target.PlanetId());
NietMijnPlaneten[index].Owner(1);
return NietMijnPlaneten;
}
示例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)
{
Console.WriteLine("" + source.PlanetId() + " " + dest.PlanetId() +
" " + numShips);
Console.Out.Flush();
}