Skip to content
Snippets Groups Projects
Commit cd3a7113 authored by ugotgnomedha's avatar ugotgnomedha
Browse files

2.0

parent 5a68c761
Branches
Tags 2.0
No related merge requests found
......@@ -9,15 +9,23 @@ public class GameConsoleApplication {
public static void main(String[] args) {
SpringApplication.run(GameConsoleApplication.class, args);
GameRunner gameRunner = new GameRunner();
GameRunnerConsole gameRunner = new GameRunnerConsole();
gameRunner.runGame();
}
}
class GameRunner {
private final PacMan game;
interface GamingConsole {
public void up();
public void down();
public void left();
public void right();
public void start();
}
class GameRunnerConsole {
private GamingConsole game;
public GameRunner() {
public GameRunnerConsole() {
this.game = new PacMan();
}
......@@ -30,7 +38,7 @@ class GameRunner {
}
}
class PacMan {
class PacMan implements GamingConsole {
public void start() {
System.out.println("Starting PacMan game...");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment