public class Miner extends GameObject
Modifier and Type | Field and Description |
---|---|
int |
bombs
The number of bombs being carried by this Miner.
|
int |
buildingMaterials
The number of building materials carried by this Miner.
|
Upgrade |
currentUpgrade
The Upgrade this Miner is on.
|
int |
dirt
The amount of dirt carried by this Miner.
|
int |
health
The remaining health of this Miner.
|
int |
miningPower
The remaining mining power this Miner has this turn.
|
int |
moves
The number of moves this Miner has left this turn.
|
int |
ore
The amount of ore carried by this Miner.
|
Player |
owner
The Player that owns and can control this Miner.
|
Tile |
tile
The Tile this Miner is on.
|
int |
upgradeLevel
The upgrade level of this Miner.
|
logs
Modifier and Type | Method and Description |
---|---|
boolean |
build(Tile tile,
java.lang.String type)
Builds a support, shield, or ladder on Miner's Tile, or an adjacent Tile.
|
boolean |
buy(java.lang.String resource,
int amount)
Purchase a resource from the Player's base or hopper.
|
boolean |
dump(Tile tile,
java.lang.String material,
int amount)
Dumps materials from cargo to an adjacent Tile.
|
boolean |
mine(Tile tile,
int amount)
Mines the Tile the Miner is on or an adjacent Tile.
|
boolean |
move(Tile tile)
Moves this Miner from its current Tile to an adjacent Tile.
|
boolean |
transfer(Miner miner,
java.lang.String resource,
int amount)
Transfers a resource from the one Miner to another.
|
boolean |
upgrade()
Upgrade this Miner by installing an upgrade module.
|
log
public int bombs
public int buildingMaterials
public Upgrade currentUpgrade
public int dirt
public int health
public int miningPower
public int moves
public int ore
public Player owner
public Tile tile
public int upgradeLevel
public boolean build(Tile tile, java.lang.String type)
tile
- The Tile to build on.type
- The structure to build (support, ladder, or shield).public boolean buy(java.lang.String resource, int amount)
resource
- The type of resource to buy.amount
- The amount of resource to buy. Amounts <= 0 will buy all of that material Player can.public boolean dump(Tile tile, java.lang.String material, int amount)
tile
- The Tile the materials will be dumped on.material
- The material the Miner will drop. 'dirt', 'ore', or 'bomb'.amount
- The number of materials to drop. Amounts <= 0 will drop all of the material.public boolean mine(Tile tile, int amount)
tile
- The Tile the materials will be mined from.amount
- The amount of material to mine up. Amounts <= 0 will mine all the materials that the Miner can.public boolean move(Tile tile)
tile
- The Tile this Miner should move to.public boolean transfer(Miner miner, java.lang.String resource, int amount)
miner
- The Miner to transfer materials to.resource
- The type of resource to transfer.amount
- The amount of resource to transfer. Amounts <= 0 will transfer all the of the material.public boolean upgrade()
© 2020 MST ACM SIG-GAME