monkey-island/src/fr/eseo/game/model/Pirate.java
public void foundElement(Element element) {
		if (element != null) {
			if (element instanceof Rhum) {
				element.setHidden(true);
				this.setEnergy(this.energy + Rhum.ENERGY_RECOVER);
				this.cell.getIsland().notifyClients(CommandEnum.RHUM, element);
			} else if (element instanceof Treasure) {
				element.setHidden(false);
				this.cell.getIsland().notifyClients(CommandEnum.TREASURE, element);
				this.cell.getIsland().newGame();
			}
			element.setFound(true);
		}
	}
/**
	 * Check if a pirate found an element.
	 *
	 * @param element
	 *            can be a rhum or a treasure.
	 */
Check if a pirate found an element.
@param element
can be a rhum or a treasure.
Check if a pirate found an element . @param element can be a rhum or a treasure .
public void foundElement(Element element) {
		if (element != null) {
			if (element instanceof Rhum) {
				element.setHidden(true);
				this.setEnergy(this.energy + Rhum.ENERGY_RECOVER);
				this.cell.getIsland().notifyClients(CommandEnum.RHUM, element);
			} else if (element instanceof Treasure) {
				element.setHidden(false);
				this.cell.getIsland().notifyClients(CommandEnum.TREASURE, element);
				this.cell.getIsland().newGame();
			}
			element.setFound(true);
		}
	}
public void foundElement ( Element element ) { if ( element != null ) { if ( element instanceof Rhum ) { element . setHidden ( true ) ; this . setEnergy ( this . energy + Rhum . ENERGY_RECOVER ) ; this . cell . getIsland ( ) . notifyClients ( CommandEnum . RHUM , element ) ; } else if ( element instanceof Treasure ) { element . setHidden ( false ) ; this . cell . getIsland ( ) . notifyClients ( CommandEnum . TREASURE , element ) ; this . cell . getIsland ( ) . newGame ( ) ; } element . setFound ( true ) ; } }
Check if a pirate found an element.
Check if a pirate found an element .