Player added methods and javadoc

This commit is contained in:
Andrin Fassbind 2021-11-26 12:32:26 +01:00
parent 5e0ebedfea
commit 9a79bf0cf4
1 changed files with 13 additions and 0 deletions

View File

@ -37,6 +37,19 @@ public class Player {
return resources;
}
/**
* This method returns player faction
* @return
*/
public Config.Faction getFaction() { return faction; }
/**
* This method returns for specific resource how much player possesess.
* @param resource
* @return
*/
public int getSpecificResource(Config.Resource resource) { return resources.get(resource); }
/**
* This method adds a specific resource to resourcess
* @param resource to add