-
Notifications
You must be signed in to change notification settings - Fork 0
/
Player.java
44 lines (37 loc) · 859 Bytes
/
Player.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package Maestus.Porkyman;
/**
* The player is the entity that represents a person's character
* The player may have a pockymon and an item to support it in battle
* @author Oracle
*
*/
public abstract class Player {
private final boolean isHuman;
/**
* Constructs one of two possible players regarding either human or computerized input
* @param isHuman
*/
public Player(boolean isHuman) {
super();
this.isHuman = isHuman;
}
/**
* Retrieves the player's pockymon
* @return pockymon
*/
public abstract Pockymon getPockymon();
/**
* Retrieves the player's item
* @return
*/
public abstract IItem getItem();
/**
* Implements a method for running away
*/
public abstract void run();
/**
* Ascertains whether human or computer player
* @return isHuman
*/
public boolean isHuman() { return isHuman; }
}