本文整理汇总了Java中net.sf.freecol.common.model.Colony.NoBuildReason类的典型用法代码示例。如果您正苦于以下问题:Java NoBuildReason类的具体用法?Java NoBuildReason怎么用?Java NoBuildReason使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
NoBuildReason类属于net.sf.freecol.common.model.Colony包,在下文中一共展示了NoBuildReason类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: canBeBuiltInColony
import net.sf.freecol.common.model.Colony.NoBuildReason; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
public NoBuildReason canBeBuiltInColony(Colony colony,
List<BuildableType> assumeBuilt) {
// Non-person units need a BUILD ability, present or assumed.
if (!hasAbility(Ability.PERSON)
&& !colony.hasAbility(Ability.BUILD, this)
&& none(assumeBuilt, bt -> bt.hasAbility(Ability.BUILD, this))) {
return Colony.NoBuildReason.MISSING_BUILD_ABILITY;
}
return Colony.NoBuildReason.NONE;
}
示例2: canBeBuiltInColony
import net.sf.freecol.common.model.Colony.NoBuildReason; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
public NoBuildReason canBeBuiltInColony(Colony colony,
List<BuildableType> assumeBuilt) {
return Colony.NoBuildReason.NONE;
}
示例3: canBeBuiltInColony
import net.sf.freecol.common.model.Colony.NoBuildReason; //导入依赖的package包/类
/**
* Check to see if this buildable type can be built in a colony
* based on the buildings or units available.
*
* @param colony The {@code Colony} to check.
* @param assumeBuilt A list of {@code BuildableType}s.
* @return The reason the for failure, or NoBuildReason.NONE on success.
*/
public abstract NoBuildReason canBeBuiltInColony(Colony colony,
List<BuildableType> assumeBuilt);