コード例 #1
0
ファイル: IndianSettlement.java プロジェクト: vardars/FreeCol
 /**
  * Sets the contact level of this settlement to indicate that a European player has visited the
  * settlement.
  *
  * @param player The visiting <code>Player</code>.
  * @return True if this was the first time the settlement was visited by the player.
  */
 public boolean setVisited(Player player) {
   if (!hasVisited(player)) {
     if (!hasContacted(player)) initializeAlarm(player);
     contactLevels.put(player, ContactLevel.VISITED);
     return true;
   }
   return false;
 }
コード例 #2
0
ファイル: IndianSettlement.java プロジェクト: vardars/FreeCol
 /**
  * Sets the contact level of this settlement to indicate that a European player has had a chat
  * with the chief.
  *
  * @param player The visiting <code>Player</code>.
  * @return True if this was the first time the settlement was scouted by the player.
  */
 public boolean setScouted(Player player) {
   if (!hasScouted(player)) {
     if (!hasContacted(player)) initializeAlarm(player);
     contactLevels.put(player, ContactLevel.SCOUTED);
     return true;
   }
   return false;
 }
コード例 #3
0
ファイル: IndianSettlement.java プロジェクト: vardars/FreeCol
 /**
  * Make contact with this settlement (if it has not been previously contacted). Initialize tension
  * level to the general level with respect to the contacting player--- effectively the average
  * reputation of this player with the overall tribe.
  *
  * @param player The <code>Player</code> making contact.
  * @return True if this was indeed the first contact between settlement and player.
  */
 public boolean setContacted(Player player) {
   if (!hasContacted(player)) {
     contactLevels.put(player, ContactLevel.CONTACTED);
     initializeAlarm(player);
     return true;
   }
   return false;
 }