docs: Added simple docs and dockerized backend

This commit is contained in:
2025-01-02 16:12:31 +01:00
parent d8969df0d3
commit fdce5f2a62
19 changed files with 858 additions and 35 deletions

View File

@ -7,7 +7,7 @@ import java.io.IOException;
import java.util.List;
public class Main {
public static void main(String[] args) throws IOException {
public static void main(String[] args) throws IOException, InterruptedException {
Chronos chronos = new Chronos();
Cli.printHeader("Načítání hry Chronos");
@ -19,6 +19,11 @@ public class Main {
} else {
// Setup a server
Cli.info("Konfigurace nebyla nalezena! Vytvářím novou.");
Cli.info("Hra vyžaduje podporu barevných kódů ANSI (ANSI color codes) pro správnou funkčnost všech miniher. Pokud Váš terminál nepodporuje ANSI využijte jiný terminál. Taky doporučuji mít nastavené schéma barev odpovídající skutečným barvám abyste byli schopni rozpoznat barvy např. v minihře Wordle.");
Thread.sleep(2000);
chronos.setup();
}

View File

@ -294,10 +294,9 @@ public class Chronos {
var res = apiService.takeItems(getLocalData().getUserSecret(), character.getId()).execute();
var body = res.body().getData().get();
if (body == TakeItemsResponse.ALREADY_TAKEN) {
Cli.type(Cli.Colors.YELLOW + character.getName() + ": " + Cli.Colors.RESET + "Už jsem ti mé itemy dal. Už pro tebe nic nemám.");
} else {
Cli.gotItems(character.getInventory());
switch (body) {
case ALREADY_TAKEN -> Cli.type(Cli.Colors.YELLOW + character.getName() + ": " + Cli.Colors.RESET + "Už jsem ti mé itemy dal. Už pro tebe nic nemám.");
case DONE -> Cli.gotItems(character.getInventory());
}
}