Class World
- java.lang.Object
-
- page.codeberg.terratactician_expandoria.bots.World
-
public class World extends java.lang.Object
World is a wrapper for ChallengeTickEvent, providing easy access to world data.
-
-
Field Summary
Fields Modifier and Type Field Description ChallengeTickEvent
event
linked ChallengeTickEvent
-
Constructor Summary
Constructors Constructor Description World(ChallengeTickEvent event)
Creates a World object from a ChallengeTickEvent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getActionCount()
Returns the amount of permitted actions per challengeTick.BuildArea
getBuildArea()
Returns an Object describing the array where cards are placable.Hand
getHand()
Gets an Object containing all playable cards on your card hand.Map
getMap()
Returns a Map Object containing all Tiles.Metrics
getRedrawCosts()
Returns the amount of resources you have to pay, to redraw your card hands.double
getRedrawTime()
Returns the seconds left until the next free redraw is possible.Metrics
getResources()
Returns the Resources you currently posses.Metrics
getResourcesRate()
Returns the current amount of metrics produced by the map.Rewards
getRewards()
Returns an Object containing all collectable rewards.int
getRound()
Returns the current round number.double
getRoundTime()
Returns the time left in the current round in seconds.Metrics
getTargetResources()
Returns the amount of metrics the is needed to survive a round.
-
-
-
Field Detail
-
event
public ChallengeTickEvent event
linked ChallengeTickEvent
-
-
Constructor Detail
-
World
public World(ChallengeTickEvent event)
Creates a World object from a ChallengeTickEvent.- Parameters:
event
- current ChallengeTickEvent
-
-
Method Detail
-
getActionCount
public int getActionCount()
Returns the amount of permitted actions per challengeTick. The value is usually one.- Returns:
- amount of concurrent actions
-
getMap
public Map getMap()
Returns a Map Object containing all Tiles. This Tiles contribute to the Resource calculation.- Returns:
- a map
-
getRound
public int getRound()
Returns the current round number. Round numbers are zero indexed.- Returns:
- current Round number starting with 0
-
getRoundTime
public double getRoundTime()
Returns the time left in the current round in seconds.- Returns:
- time left in seconds
-
getHand
public Hand getHand()
Gets an Object containing all playable cards on your card hand.- Returns:
- all tiles placeable
-
getBuildArea
public BuildArea getBuildArea()
Returns an Object describing the array where cards are placable.- Returns:
- area where tiles can be placed
-
getRewards
public Rewards getRewards()
Returns an Object containing all collectable rewards.- Returns:
- all rewards, collectable
-
getRedrawCosts
public Metrics getRedrawCosts()
Returns the amount of resources you have to pay, to redraw your card hands. If all costs are zero, the redraw is free. When the redraw is free not all cards are overwritten, just the free slot will be filled again. There are 5 slots.- Returns:
- current redraw costs
-
getRedrawTime
public double getRedrawTime()
Returns the seconds left until the next free redraw is possible.- Returns:
- time left for free redraw
-
getResources
public Metrics getResources()
Returns the Resources you currently posses. This resource have to exceed the target Resource at the end of each round. If the resource goal is missed twice in secession the game is lost.- Returns:
- current metrics
-
getTargetResources
public Metrics getTargetResources()
Returns the amount of metrics the is needed to survive a round.- Returns:
- target metrics
-
getResourcesRate
public Metrics getResourcesRate()
Returns the current amount of metrics produced by the map.- Returns:
- rate metrics
-
-