-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathGame.java
More file actions
20 lines (18 loc) · 716 Bytes
/
Game.java
File metadata and controls
20 lines (18 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
public class Game extends Place{
//Override whatToDo
public void whatToDo(Player p, Friend f, Her h){
p.addGame(3);
System.out.println("You played video games.☪(Game +3)");
}
//Override meetSomeone
public void meetSomeone(Player p, Friend f, Her h, Agirl a){
int i = (int)(Math.random()*10);
if(i < 4){
p.addFriendship(2);
System.out.println("You have a good game time with " + f.getName() + ".(Friendship +2)");
}else if((i > 7 && p.getAffection()>0) || (i > 4 && p.getAffection() > 5)){
System.out.println("You meet with " + a.getName() + ", and play video games with her. You have a good cooperation♡.(Affection +3)");
p.addAffection(3);
}
}
}