Skip to content

Commit

Permalink
edit uml
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamadjavad1383 committed Apr 18, 2022
1 parent bf96133 commit 18b69d3
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 14 deletions.
Binary file modified java.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/main/java/City.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ public Unit getCivilian() {
public MilitaryUnit getMilitaryUnit() {
return militaryUnit;
}

}
12 changes: 6 additions & 6 deletions src/main/java/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ public Game(ArrayList<Civilization> civilizations, int time) {
this.time = time;
}

public int getTurn() {
return turn;
public void nextTurn() {
turn++;
}

public void setTurn(int turn) {
this.turn = turn;
public int getTurn() {
return turn;
}

public int getTime() {
return time;
}

public void setTime(int time) {
this.time = time;
public ArrayList<Civilization> getCivilizations() {
return civilizations;
}
}
27 changes: 24 additions & 3 deletions src/main/java/GameController.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,37 @@
public class GameController {
private static Game game;

public static void startGame() {

}

public static void showMap() {
}

public void cheatTurn(int turn) {
public static void cheatTurn(int turn) {
}

public void cheatGold(int turn) {
public static void cheatGold(int turn) {
}

public void setGold(int gold) {
Civilization civilization = new Civilization(null,1,null,null);
Civilization civilization = new Civilization(null, 1, null, null);
civilization.getGold();
}

public void nextTurn() {
game.nextTurn();
}

public static Game getGame() {
return game;
}

public void combat(MilitaryUnit militaryUnit, MilitaryUnit militaryUnit1) {

}

public void combat(MilitaryUnit militaryUnit, City city) {

}
}
13 changes: 8 additions & 5 deletions src/main/java/GameMenu.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
import java.util.ArrayList;
import java.util.Scanner;

public class GameMenu {
public void run(Scanner scanner) {

GameController.startGame();
}

private void showMap() {
GameController.showMap();
}

private void cheatTurn(int turn) {
GameController gameController = new GameController();
gameController.cheatTurn(turn);
GameController.cheatTurn(turn);
}

private void cheatGold(int turn) {
GameController gameController = new GameController();
gameController.cheatGold(turn);
GameController.cheatGold(turn);
}

private void showInfo() {
ArrayList<Civilization> civilizations = GameController.getGame().getCivilizations();
}
}

0 comments on commit 18b69d3

Please sign in to comment.