-
Notifications
You must be signed in to change notification settings - Fork 0
/
Race.java
70 lines (67 loc) · 1.31 KB
/
Race.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import java.util.Random;
/**
*Ahmad Beldo - Mini Project
*/
public class Race
{
public int hp, mana, energy, kills, mcount, scount; String gender, info, name;
public Race(String nam, String sex, int uhp, double mana, String inf) {
name = nam;
gender = sex;
hp = uhp;
info =inf;
}
public String getName()
{
return name;
}
public void setName(String nme)
{
name = nme;
}
public int getHP()
{
return hp;
}
public void setHP(int health)
{
hp = health;
}
public double hploss(int loss)
{
return (hp - loss);
}
public int dmgdone()
{
Random rand = new Random();
return rand.nextInt((20 - 0) + 1) + 0;
}
public String getInfo()
{
return info;
}
public int getKills()
{
return kills;
}
public void setKills(int ukills)
{
kills = ukills;
}
public int getmCount()
{
return mcount;
}
public void setmCount(int val)
{
mcount = mcount + val;
}
public int getsCount()
{
return scount;
}
public void setsCount(int val)
{
scount = scount + val;
}
}