Package break_out.model
Class Stone
- java.lang.Object
-
- break_out.model.Stone
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.Color
color
The stones color according to the stones typeprivate Position
position
The stones position on the playgroundprivate int
type
The stones typeprivate int
value
The stones value according to the stones type to calculate players score
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Color
getColor()
The getter for the stones color Can be null because a stone could not existPosition
getPosition()
The getter for the stones positionint
getType()
The getter for the stones typeint
getValue()
The getter for the stones value to calculate players scorevoid
setColor(java.awt.Color color)
The setter for the stones colorvoid
setPosition(Position position)
The setter for the stones positionvoid
setType(int type)
The setter for the stones typevoid
setValue(int value)
The setter for the stones value
-
-
-
Field Detail
-
type
private int type
The stones type
-
value
private int value
The stones value according to the stones type to calculate players score
-
color
private java.awt.Color color
The stones color according to the stones type
-
position
private Position position
The stones position on the playground
-
-
Constructor Detail
-
Stone
public Stone(int type, Position position)
The constructor of a stone- Parameters:
type
- stones initial typeposition
- stones initial position
-
-
Method Detail
-
getValue
public int getValue()
The getter for the stones value to calculate players score
-
setValue
public void setValue(int value)
The setter for the stones value
-
getColor
public java.awt.Color getColor()
The getter for the stones color Can be null because a stone could not exist
-
setColor
public void setColor(java.awt.Color color)
The setter for the stones color
-
getPosition
public Position getPosition()
The getter for the stones position- Specified by:
getPosition
in interfaceIStone
- Returns:
- The stones position
-
setPosition
public void setPosition(Position position)
The setter for the stones position- Specified by:
setPosition
in interfaceIStone
- Parameters:
position
- The stones new position
-
getType
public int getType()
The getter for the stones type
-
-