-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.java
32 lines (30 loc) · 1.19 KB
/
Main.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
import java.util.HashMap;
import java.util.Map;
public class Main {
public static void main(String[] args) {
Map<String,Player> playerMap=new HashMap<String,Player>();
playerMap.put("lrstover", new Player("Lance Stover"));
playerMap.put("jspacco", new Player("Mr. Spacco"));
System.out.println(playerMap.get("lrstover"));
playerMap.get("lrstover").addExp();
System.out.println(playerMap.get("lrstover"));
playerMap.get("lrstover").addExp();
System.out.println(playerMap.get("lrstover"));
playerMap.get("lrstover").addExp();
System.out.println(playerMap.get("lrstover"));
playerMap.get("lrstover").addExp();
System.out.println(playerMap.get("lrstover"));
playerMap.get("lrstover").addExp();
System.out.println(playerMap.get("lrstover"));
playerMap.get("lrstover").kill();
System.out.println(playerMap.get("lrstover"));
playerMap.get("lrstover").changeName("Lance");
System.out.println(playerMap.get("lrstover"));
playerMap.get("jspacco").addExp();
System.out.println(playerMap.get("jspacco"));
//test adding lots of exp
for(int i=0; i<1000; i++)
playerMap.get("lrstover").addExp();
System.out.println(playerMap.get("lrstover"));
}
}