本文整理汇总了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)
{
}
示例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();
}
示例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);
}
}
示例4: Move
public Move(Planet source, Planet dest, int numShips)
: this(source.PlanetID(), dest.PlanetID(), numShips)
{
}