-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGameDriver.java
More file actions
77 lines (49 loc) · 2.02 KB
/
GameDriver.java
File metadata and controls
77 lines (49 loc) · 2.02 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
import java.io.IOException;
import BossFight.TBD;
import Elements.Dialouge;
import Elements.AudioPlayer;
import Elements.PlayerInput;
import FightHandling.AdvancedFightingSystem;
import FightHandling.BasicFightingSystem;
import FightHandling.FightingGui;
import RoomHandling.RoomGui;
import Saving.ProgressSaving;
import Stats.Player;
public class GameDriver
{
public static void main(String[] args) throws IOException
{
//Elements
AudioPlayer audio = new AudioPlayer();
ProgressSaving saving = new ProgressSaving();
Dialouge dialougeSystem = new Dialouge();
Player player = new Player(saving.obtainSavePoint());
TBD bossFight = new TBD(player);
//Combat
BasicFightingSystem basic_FS = new BasicFightingSystem(player, dialougeSystem, audio);
AdvancedFightingSystem advanced_FS = new AdvancedFightingSystem(player, dialougeSystem, audio);
FightingGui fightGui = new FightingGui(basic_FS, advanced_FS, player, dialougeSystem,audio);
//Rooms
RoomGui roomGui = new RoomGui(fightGui, saving, player);
PlayerInput input = new PlayerInput(roomGui, fightGui,bossFight);
roomGui.addKeyListener(input);
fightGui.addKeyListener(input);
}
}
/** while(playerTest.isAlive() && enemyTest.isAlive())
{
String input = sc.next();
switch(input)
{
case "attack" -> System.out.println(enemyTest.damageRecieved(playerTest.attackAction()));
case "heal" -> playerTest.amountHealed(20);
}
System.out.println(enemyTest.getName() + " is preparing their attack!");
System.out.println(playerTest.damageRecieved(enemyTest.Attack()) + " damage has been delt!");
System.out.println("Would you like to know player stat? type y/n");
input = sc.next();
switch (input)
{
case "y" -> System.out.println(playerTest);
}
} */