Skip to content

Commit

Permalink
Merge pull request #5 from BestDownLoader365/project_skeleton
Browse files Browse the repository at this point in the history
Project skeleton
  • Loading branch information
BestDownLoader365 committed Mar 10, 2024
2 parents 1a8c378 + d727321 commit 6fbeb50
Show file tree
Hide file tree
Showing 18 changed files with 183 additions and 21 deletions.
6 changes: 6 additions & 0 deletions src/main/java/command/Command.java
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();
}
8 changes: 8 additions & 0 deletions src/main/java/command/QuitCommand.java
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() {

}
}
10 changes: 10 additions & 0 deletions src/main/java/command/fight/FightingCommand.java
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(){

}
}
10 changes: 10 additions & 0 deletions src/main/java/command/fight/RunningCommand.java
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(){

}
}
9 changes: 9 additions & 0 deletions src/main/java/command/mapmove/InteractingCommand.java
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() {

}
}
8 changes: 8 additions & 0 deletions src/main/java/command/mapmove/MapMoveCommand.java
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();
}
10 changes: 10 additions & 0 deletions src/main/java/command/mapmove/MovingDownwardCommand.java
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() {

}
}
8 changes: 8 additions & 0 deletions src/main/java/command/mapmove/MovingForwardCommand.java
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() {

}
}
8 changes: 8 additions & 0 deletions src/main/java/command/mapmove/MovingLeftCommand.java
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() {

}
}
9 changes: 9 additions & 0 deletions src/main/java/command/mapmove/MovingRightCommand.java
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 src/main/java/main/CalculaChroniclesOfTheAlgorithmicKingdom.java
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);
}
}
}
13 changes: 13 additions & 0 deletions src/main/java/map/DemoMap.java
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){

}
}
8 changes: 8 additions & 0 deletions src/main/java/map/Map.java
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);
}
9 changes: 9 additions & 0 deletions src/main/java/parser/Parser.java
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;
}
}
21 changes: 0 additions & 21 deletions src/main/java/seedu/duke/Duke.java

This file was deleted.

7 changes: 7 additions & 0 deletions src/main/java/textbox/PlayerStatus.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package textbox;

public class PlayerStatus {
public void showPlayerStatus(){

}
}
13 changes: 13 additions & 0 deletions src/main/java/textbox/TextBox.java
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){

}
}
10 changes: 10 additions & 0 deletions src/main/java/ui/Ui.java
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("===========================================================");
}
}

0 comments on commit 6fbeb50

Please sign in to comment.