-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathInGameMenu.java
More file actions
82 lines (67 loc) · 1.59 KB
/
InGameMenu.java
File metadata and controls
82 lines (67 loc) · 1.59 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.Scanner;
//Haseeb Saadut
public class InGameMenu
{
public int Score;
public InGameMenu()
{
Score = getScore();
}
public int getScore() {
return Score;
}
public void setScore(int score) {
Score = score;
}
private File f;
public void saveGame()
{
String playerName = Player.getPlayername();
f = new File(playerName + " -Game.txt");
{
int a = Player.getHealthPoints();
int b = Player.getAttackPoints();
int c = Player. getDefensePoints();
int d = Player.getSpeedPoints();
String e = Player.getPlayername();
String f = Rooms.roomDescription;
//int g = Rooms.getRoomCode();
//String h = Inventory.printInventory();
System.out.println("Saving " + e + " game...");
System.out.println("Saving " + a + " HP");
System.out.println("Saving " + b + " ATK");
System.out.println("Saving " + c + " DEF");
System.out.println("Saving " + d + " Speed");
}
}
public void quitGame()
{
new GameSystem().quitGame();
}
public void increaseScore(int n)
{
Score+=n;
}
public void decreaseScore(int n)
{
Score-=n;
}
public void multiplyScore()
{
}
public void getHelp()
{
new GameSystem().howToPlay();
}
public static void main(String args[])
{
Player j = new Player("John");
new InGameMenu().saveGame();
}
}