-
Notifications
You must be signed in to change notification settings - Fork 0
/
Person.java
52 lines (47 loc) · 1.31 KB
/
Person.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
45
46
47
48
49
50
51
52
import java.util.ArrayList;
/**
* This class is the main class of the "Queen saving" Game`
*
* We can create the characters of the game like knight, queen in this class.
* Some rooms have the characters for player to deal with.
*
* @author 121880(Long Yu)
* @version 1.0 (Nov 2013)
*/
public class Person
{
// instance variables
private String description;
public String name;
public int aggressivity;
Gear myGears = null;
/**
* Create a room named "name", described "description" and have aggressivity.
* @param all the parameters have to be supplied,
* first param is name, second is description and third one is aggressivity.
*
*/
public Person(String name, String description,int aggressivity)
{
this.name = name;
this.description = description;
this.aggressivity = aggressivity;
System.out.println("Successfully initialize the character => "+description);
}
/**
* setter method of the Person object
* @param parameter is the gear of the characters
*/
public void setGear(Gear flashlight)
{
myGears = flashlight;
}
/**
* getter method of the Person object
* @return the gear object of the characters'
*/
public Gear getGear()
{
return myGears;
}
}