Constructor and Description |
---|
Player()
creates a player with 100 hitPoints, 20 attack, and 1 speed
|
Modifier and Type | Method and Description |
---|---|
void |
attacking(Monster mon)
a method for attacking monsters and incrementing player's score
|
int |
getAttack() |
int |
getHitPoints() |
char |
getIcon()
This is the getter to figure out what piece icon it is.
|
int[] |
getPlayerPosition() |
int |
getScore() |
int |
getSpeed() |
String |
getTypeOfPiece()
this gets the type of piece of the object
|
void |
setAttack(int atk)
sets that player's attack
|
void |
setHitPoints(int newHp)
sets the player's hitPoints
|
void |
setIcon(char NewIcon)
This is the setter for the Icon it will be
|
void |
setPlayerPosition(int[] playerPosition) |
void |
setScore(int newScore)
sets the player's Score
|
void |
setSpeed(int speed)
sets the player's speed
|
void |
setTypeOfPiece(String newTypeOfPiece)
this sets the type of piece of the object
|
public Player()
public int getHitPoints()
public void setSpeed(int speed)
speed
- this is the new value of the player's speed, can only be from 1 to 5public int getSpeed()
public int getScore()
public void setAttack(int atk)
atk
- this is the amount of points you want to set the player withpublic int getAttack()
public int[] getPlayerPosition()
public void setPlayerPosition(int[] playerPosition)
public void setHitPoints(int newHp)
newHp
- the hitPoints that is to be setpublic void setScore(int newScore)
newScore
- is the score that is to be setpublic void attacking(Monster mon)
mon
- the monster being attackedpublic String getTypeOfPiece()
getTypeOfPiece
in interface GamePiece
public void setTypeOfPiece(String newTypeOfPiece)
setTypeOfPiece
in interface GamePiece
newTypeOfPiece
- it is the new type of piece it will be.public char getIcon()