forked from nus-cs2113-AY2324S2/tp
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from BestDownLoader365/project_skeleton
Project skeleton
- Loading branch information
Showing
18 changed files
with
183 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package command; | ||
|
||
public abstract class Command { | ||
protected String commandDescription; | ||
public abstract void execute(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package command; | ||
|
||
public class QuitCommand extends Command{ | ||
@Override | ||
public void execute() { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package command.fight; | ||
|
||
import command.Command; | ||
|
||
public class FightingCommand extends Command { | ||
@Override | ||
public void execute(){ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package command.fight; | ||
|
||
import command.Command; | ||
|
||
public class RunningCommand extends Command { | ||
@Override | ||
public void execute(){ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package command.mapmove; | ||
|
||
|
||
public class InteractingCommand extends MapMoveCommand { | ||
@Override | ||
public void execute() { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package command.mapmove; | ||
|
||
import command.Command; | ||
|
||
public abstract class MapMoveCommand extends Command { | ||
protected String commandModifier; | ||
public abstract void execute(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package command.mapmove; | ||
|
||
|
||
public class MovingDownwardCommand extends MapMoveCommand { | ||
|
||
@Override | ||
public void execute() { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package command.mapmove; | ||
|
||
public class MovingForwardCommand extends MapMoveCommand { | ||
@Override | ||
public void execute() { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package command.mapmove; | ||
|
||
public class MovingLeftCommand extends MapMoveCommand { | ||
@Override | ||
public void execute() { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package command.mapmove; | ||
|
||
|
||
public class MovingRightCommand extends MapMoveCommand { | ||
@Override | ||
public void execute() { | ||
|
||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
src/main/java/main/CalculaChroniclesOfTheAlgorithmicKingdom.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package main; | ||
|
||
import command.Command; | ||
import map.DemoMap; | ||
import map.Map; | ||
import parser.Parser; | ||
import textbox.PlayerStatus; | ||
import textbox.TextBox; | ||
import ui.Ui; | ||
|
||
public class CalculaChroniclesOfTheAlgorithmicKingdom { | ||
public static void main(String[] args) { | ||
new CalculaChroniclesOfTheAlgorithmicKingdom().startGame(); | ||
} | ||
|
||
public void startGame() { | ||
PlayerStatus playerStatus = new PlayerStatus(); | ||
TextBox textBox = new TextBox(); | ||
Parser parser = new Parser(); | ||
Map map = new DemoMap(); | ||
|
||
Ui ui = new Ui(); | ||
map.initMap(); | ||
textBox.initTextBox(); | ||
|
||
Command userCommand; | ||
while (true) { | ||
String userCommandText = ui.readInCommand(); | ||
userCommand = parser.parserCommand(userCommandText); | ||
userCommand.execute(); | ||
|
||
map.nextMapBasedOnCommand(userCommand); | ||
playerStatus.showPlayerStatus(); | ||
textBox.nextTextBoxBasedOnMapAndCommand(userCommand, map); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package map; | ||
|
||
import command.Command; | ||
|
||
public class DemoMap extends Map{ | ||
public void initMap(){ | ||
|
||
} | ||
|
||
public void nextMapBasedOnCommand(Command userCommand){ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package map; | ||
|
||
import command.Command; | ||
|
||
public abstract class Map { | ||
public abstract void initMap(); | ||
public abstract void nextMapBasedOnCommand(Command userCommand); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package parser; | ||
|
||
import command.Command; | ||
|
||
public class Parser { | ||
public Command parserCommand(String userCommand){ | ||
return null; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package textbox; | ||
|
||
public class PlayerStatus { | ||
public void showPlayerStatus(){ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package textbox; | ||
|
||
import command.Command; | ||
import map.Map; | ||
|
||
public class TextBox { | ||
public void initTextBox(){ | ||
|
||
} | ||
public void nextTextBoxBasedOnMapAndCommand(Command userCommand, Map map){ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package ui; | ||
import java.util.Scanner; | ||
public class Ui { | ||
public String readInCommand(){ | ||
return null; | ||
} | ||
public void printDividingLine(){ | ||
System.out.println("==========================================================="); | ||
} | ||
} |