Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Show a message if the game is played by first time
Browse files Browse the repository at this point in the history
  • Loading branch information
CiroZDP committed Apr 27, 2024
1 parent 25c266f commit f9e2fc9
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions src/main/java/net/op/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ public static void main(String[] args) {
if (argSet.has(configFileArgument))
Config.DEFAULT_CONFIG_FILE = (String) argSet.valueOf(configFileArgument);

boolean playedForFirstTime = false;
if (!new File(Config.DEFAULT_CONFIG_FILE).exists())
playedForFirstTime = true;

// Starting game
Client game = Client.getClient();
Thread gameThread = game.thread();
Expand All @@ -295,17 +299,18 @@ public static void main(String[] args) {
logger.error("The game ended with errors!");
}

// TODO: Implement this if the game is played by first time
System.out.println();
System.out.println(" ===== Thanks for playing OpenCraft =====");
System.out.println(" We wish you the best experience with");
System.out.println(" this game because we are putting all");
System.out.println(" our efforts to make this game.");
System.out.println();
System.out.println(" If you want, you can share this game!");
System.out.println(" =========== You're welcome!! ===========");
System.out.println(" - OpenCraft's Developer Team " + Calendar.getInstance().get(Calendar.YEAR));

if (playedForFirstTime) {
System.out.println();
System.out.println(" ===== Thanks for playing OpenCraft =====");
System.out.println(" We wish you the best experience with");
System.out.println(" this game because we are putting all");
System.out.println(" our efforts to make this game.");
System.out.println();
System.out.println(" If you want, you can share this game!");
System.out.println(" =========== You're welcome!! ===========");
System.out.println(" - OpenCraft's Developer Team " + Calendar.getInstance().get(Calendar.YEAR));
}

// Stops the game
System.exit(status);
}
Expand Down

0 comments on commit f9e2fc9

Please sign in to comment.