Class Neo
- java.lang.Object
- 
- de.unistuttgart.informatik.fius.icge.simulation.entity.BasicEntity
- 
- de.unistuttgart.informatik.fius.icge.simulation.entity.MovableEntity
- 
- de.unistuttgart.informatik.fius.icge.simulation.entity.GreedyEntity
- 
- de.unistuttgart.informatik.fius.jvk.provided.entity.Human
- 
- de.unistuttgart.informatik.fius.jvk.provided.entity.Neo
 
 
 
 
 
- 
- All Implemented Interfaces:
- Entity,- EntityCollector
 
 public class Neo extends Human The Neo entity- Author:
- Tim Neumann
 
- 
- 
Field Summary- 
Fields inherited from class de.unistuttgart.informatik.fius.icge.simulation.entity.GreedyEntityinventoryOperationLock
 - 
Fields inherited from class de.unistuttgart.informatik.fius.icge.simulation.entity.BasicEntityendOfLastEnqueuedOperation
 
- 
 - 
Constructor SummaryConstructors Constructor Description Neo()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanCollectCoin()booleancanDropCoin()voidcollectCoin()collects a coin from the actual fieldvoiddropCoin()drops a coin from Neo's inventory to the actual fieldintgetCoinsInWallet()List<Coin>getCurrentlyCollectableCoins()protected StringgetTextureHandle()protected voidsetCoins(int coins)Add the amount of coins to the inventoryvoidsetCoinsInWallet(int amountOfCoins)Helper Method that sets a fixed amount of coins for easier verification.- 
Methods inherited from class de.unistuttgart.informatik.fius.jvk.provided.entity.HumangetZPosition
 - 
Methods inherited from class de.unistuttgart.informatik.fius.icge.simulation.entity.GreedyEntitycanCarry, collect, drop, drop, getCurrentlyCollectableEntities, getCurrentlyDroppableEntities, getInventory
 - 
Methods inherited from class de.unistuttgart.informatik.fius.icge.simulation.entity.MovableEntitycanMove, getDrawInformation, getLookingDirection, getLookingDirectionString, move, moveIfPossible, turnClockWise
 - 
Methods inherited from class de.unistuttgart.informatik.fius.icge.simulation.entity.BasicEntityenqueueToPerformNewOperation, getPlayfield, getPosition, getSimulation, initOnPlayfield, isOnPlayfield, sleep, toString
 
- 
 
- 
- 
- 
Method Detail- 
getTextureHandleprotected String getTextureHandle() - Specified by:
- getTextureHandlein class- BasicEntity
 
 - 
collectCoin@InspectionMethod public void collectCoin() collects a coin from the actual field- Throws:
- NoCoinException- when there is no coin
 
 - 
dropCoin@InspectionMethod public void dropCoin() drops a coin from Neo's inventory to the actual field- Throws:
- NeoIsBrokeException- when Neo is broken
 
 - 
canDropCoin@InspectionAttribute public boolean canDropCoin() - Returns:
- whether Neo can drop a coin
 
 - 
canCollectCoin@InspectionAttribute public boolean canCollectCoin() - Returns:
- whether there is a coin to collect
 
 - 
getCurrentlyCollectableCoinspublic List<Coin> getCurrentlyCollectableCoins() - Returns:
- a List of all Coins on Neos field
 
 - 
setCoinsprotected void setCoins(int coins) Add the amount of coins to the inventory- Parameters:
- coins- the amount of coins to set
 
 - 
setCoinsInWalletpublic void setCoinsInWallet(int amountOfCoins) Helper Method that sets a fixed amount of coins for easier verification. Used in Verification of Task 2.1- Parameters:
- amountOfCoins- the new amount of coins
 
 - 
getCoinsInWallet@InspectionAttribute public int getCoinsInWallet() - Returns:
- the number of coins in neos wallet
 
 
- 
 
-