Coin

public class Coin extends FieldEntity(source)

A field entity that represents coins on a graphical user interface.

Constructors

Link copied to clipboard
public void Coin(int x, int y)
Constructs and initializes a single coin at the specified (x,y) location.
public void Coin(int x, int y, int count)
Constructs and initializes the coins at the specified (x,y) location.

Properties

Link copied to clipboard
public int count
The number of coins that this coin entity currently owns.
Link copied to clipboard
public int x
The X coordinate of this FieldEntity.
Link copied to clipboard
public int y
The Y coordinate of this FieldEntity.

Functions

Link copied to clipboard
public int getCount()
Returns the current number of coins of this Coin entity.
Link copied to clipboard
public int getX()
Returns the X coordinate of this FieldEntity.
Link copied to clipboard
public int getY()
Returns the Y coordinate of this FieldEntity.
Link copied to clipboard
public void setCount(int count)
Sets the current number of coins of this coin entity to the specified number of coins.
Link copied to clipboard
protected void setX(int x)
Sets the X coordinate of the field entity to the specified X coordinate.
Link copied to clipboard
protected void setY(int y)
Sets the Y coordinate of the field entity to the specified Y coordinate.