diff --git a/backend/src/main/java/cz/jzitnik/chronos/controllers/RoomController.java b/backend/src/main/java/cz/jzitnik/chronos/controllers/RoomController.java index c612fc1..31e61e9 100644 --- a/backend/src/main/java/cz/jzitnik/chronos/controllers/RoomController.java +++ b/backend/src/main/java/cz/jzitnik/chronos/controllers/RoomController.java @@ -1,5 +1,6 @@ package cz.jzitnik.chronos.controllers; +import cz.jzitnik.chronos.entities.Item; import cz.jzitnik.chronos.entities.Message; import cz.jzitnik.chronos.entities.MessageType; import cz.jzitnik.chronos.entities.Room; @@ -8,11 +9,14 @@ import cz.jzitnik.chronos.payload.responses.UnifiedResponse; import cz.jzitnik.chronos.repository.PlayerRepository; import cz.jzitnik.chronos.repository.RoomRepository; import cz.jzitnik.chronos.services.GameService; +import cz.jzitnik.chronos.services.ItemService; import cz.jzitnik.chronos.utils.anotations.CheckUser; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; import java.util.List; @CrossOrigin(origins = "*", maxAge = 3600) @@ -28,9 +32,12 @@ public class RoomController { @Autowired private GameService gameService; + @Autowired + private ItemService itemService; + @GetMapping @CheckUser - public ResponseEntity, Error>> getAllRooms(@RequestParam("playerKey") String playerKey) { + public ResponseEntity, Error>> getAllRooms(@RequestParam String playerKey) { var player = playerRepository.findByPlayerKey(playerKey).get(); return ResponseEntity.ok( @@ -40,7 +47,7 @@ public class RoomController { @GetMapping("/room") @CheckUser - public ResponseEntity> getRoom(@RequestParam("playerKey") String playerKey, @RequestParam("roomId") Long roomId) { + public ResponseEntity> getRoom(@RequestParam String playerKey, @RequestParam Long roomId) { var player = playerRepository.findByPlayerKey(playerKey).get(); var roomOptional = roomRepository.findById(roomId); @@ -64,7 +71,7 @@ public class RoomController { @GetMapping("/current_room") @CheckUser - public ResponseEntity> getCurrentRoom(@RequestParam("playerKey") String playerKey) { + public ResponseEntity> getCurrentRoom(@RequestParam String playerKey) { var player = playerRepository.findByPlayerKey(playerKey).get(); return ResponseEntity.ok( @@ -74,7 +81,7 @@ public class RoomController { @PostMapping("/move") @CheckUser - public ResponseEntity> moveToRoom(@RequestParam("playerKey") String playerKey, @RequestParam("roomId") Long roomId) { + public ResponseEntity> moveToRoom(@RequestParam String playerKey, @RequestParam Long roomId) { var player = playerRepository.findByPlayerKey(playerKey).get(); var roomOptional = roomRepository.findById(roomId); @@ -83,21 +90,50 @@ public class RoomController { return ResponseEntity.status(HttpStatus.NOT_FOUND).body(UnifiedResponse.failure(null)); } - var fromThisGame = gameService.isFromThisGame(player.getGame(), roomOptional.get()); + var room = roomOptional.get(); + + var fromThisGame = gameService.isFromThisGame(player.getGame(), room); if (!fromThisGame) { return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(UnifiedResponse.failure(new Error("Invalid roomId"))); } - player.setCurrentRoom(roomOptional.get()); + player.setCurrentRoom(room); // Send message to chat var message = new Message(player, String.valueOf(roomId), MessageType.MOVE_TO_ROOM); - player.getMessages().add(message); - playerRepository.save(player); return ResponseEntity.ok(UnifiedResponse.success(null)); } + + @PostMapping("/take_items") + @CheckUser + public ResponseEntity, Error>> takeItems(@RequestParam String playerKey) { + var player = playerRepository.findByPlayerKey(playerKey).get(); + + var room = player.getCurrentRoom(); + + if (room.getItems().isEmpty()) { + return ResponseEntity.status(HttpStatus.NO_CONTENT).body(UnifiedResponse.failure(new Error("No items in this room!"))); + } + + var items = room.getItems(); + + var availableSlots = player.getInventorySize() - player.getInventory().size(); + System.out.println(availableSlots); + + var playerGotItems = new ArrayList(); + + for (var i = 0; i <= Math.min(items.size(), availableSlots) - 1; i++) { + var item = items.get(i); + item.setRoom(null); + item.setOwner(player); + itemService.addItem(player, item); + playerGotItems.add(item); + } + + return ResponseEntity.ok(UnifiedResponse.success(playerGotItems)); + } } diff --git a/backend/src/main/java/cz/jzitnik/chronos/entities/Item.java b/backend/src/main/java/cz/jzitnik/chronos/entities/Item.java index a025040..b77d9f7 100644 --- a/backend/src/main/java/cz/jzitnik/chronos/entities/Item.java +++ b/backend/src/main/java/cz/jzitnik/chronos/entities/Item.java @@ -39,4 +39,9 @@ public class Item { this.itemType = itemType; this.owner = owner; } + + public Item(ItemType itemType, Room room) { + this.itemType = itemType; + this.room = room; + } } diff --git a/backend/src/main/java/cz/jzitnik/chronos/entities/ItemType.java b/backend/src/main/java/cz/jzitnik/chronos/entities/ItemType.java index 3085752..784f483 100644 --- a/backend/src/main/java/cz/jzitnik/chronos/entities/ItemType.java +++ b/backend/src/main/java/cz/jzitnik/chronos/entities/ItemType.java @@ -4,7 +4,8 @@ import cz.jzitnik.chronos.payload.errors.ItemNotUsableException; public enum ItemType { KEY_FRAGMENT, - LUCK_POTION; + LUCK_POTION, + GOLDEN_WATCH; public void useItem(Player player) throws ItemNotUsableException { switch (this) { diff --git a/backend/src/main/java/cz/jzitnik/chronos/entities/Player.java b/backend/src/main/java/cz/jzitnik/chronos/entities/Player.java index 2d812bf..4cd32b3 100644 --- a/backend/src/main/java/cz/jzitnik/chronos/entities/Player.java +++ b/backend/src/main/java/cz/jzitnik/chronos/entities/Player.java @@ -9,6 +9,7 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; +import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; @@ -66,4 +67,18 @@ public class Player { public void addItem(Item item) { inventory.add(item); } + + @JsonIgnore + public int getInventorySize() { + try { + Field field = this.getClass().getDeclaredField("inventory"); + if (field.isAnnotationPresent(Size.class)) { + Size size = field.getAnnotation(Size.class); + return size.max(); + } + } catch (NoSuchFieldException e) { + e.printStackTrace(); + } + return Integer.MAX_VALUE; + } } diff --git a/backend/src/main/java/cz/jzitnik/chronos/interactions/Interaction.java b/backend/src/main/java/cz/jzitnik/chronos/interactions/Interaction.java index 7ff312e..3f9c82c 100644 --- a/backend/src/main/java/cz/jzitnik/chronos/interactions/Interaction.java +++ b/backend/src/main/java/cz/jzitnik/chronos/interactions/Interaction.java @@ -5,4 +5,5 @@ public enum Interaction { Cashier, Librarian, Innkeeper, + Mayor } \ No newline at end of file diff --git a/backend/src/main/java/cz/jzitnik/chronos/interactions/InteractionService.java b/backend/src/main/java/cz/jzitnik/chronos/interactions/InteractionService.java index af8f92f..9784f47 100644 --- a/backend/src/main/java/cz/jzitnik/chronos/interactions/InteractionService.java +++ b/backend/src/main/java/cz/jzitnik/chronos/interactions/InteractionService.java @@ -3,6 +3,7 @@ package cz.jzitnik.chronos.interactions; import cz.jzitnik.chronos.entities.Player; import cz.jzitnik.chronos.entities.Character; import cz.jzitnik.chronos.interactions.list.Hangman; +import cz.jzitnik.chronos.interactions.list.Mayor; import cz.jzitnik.chronos.interactions.list.RockPaperScissors; import cz.jzitnik.chronos.interactions.list.TicTacToe; import cz.jzitnik.chronos.interactions.list.wordle.Wordle; @@ -20,6 +21,8 @@ public class InteractionService { private Wordle wordle; @Autowired private TicTacToe ticTacToe; + @Autowired + private Mayor mayor; @FunctionalInterface public interface Function3 { @@ -32,6 +35,7 @@ public class InteractionService { case Cashier -> hangman::play; case Librarian -> wordle::play; case Innkeeper -> ticTacToe::play; + case Mayor -> mayor::play; }; } } \ No newline at end of file diff --git a/backend/src/main/java/cz/jzitnik/chronos/interactions/list/Mayor.java b/backend/src/main/java/cz/jzitnik/chronos/interactions/list/Mayor.java new file mode 100644 index 0000000..00997e5 --- /dev/null +++ b/backend/src/main/java/cz/jzitnik/chronos/interactions/list/Mayor.java @@ -0,0 +1,46 @@ +package cz.jzitnik.chronos.interactions.list; + +import cz.jzitnik.chronos.entities.Character; +import cz.jzitnik.chronos.entities.Item; +import cz.jzitnik.chronos.entities.ItemType; +import cz.jzitnik.chronos.entities.Player; +import cz.jzitnik.chronos.interactions.InteractionPlayer; +import cz.jzitnik.chronos.payload.responses.InteractionResponse; +import cz.jzitnik.chronos.repository.CharacterRepository; +import cz.jzitnik.chronos.services.ItemService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; + +@Service +public class Mayor implements InteractionPlayer { + @Autowired + private ItemService itemService; + @Autowired + private CharacterRepository characterRepository; + + @Override + public InteractionResponse play(Player player, Character character, String data) { + var playerItems = player.getInventory(); + var golderWatches = playerItems.stream().filter(item -> item.getItemType().equals(ItemType.GOLDEN_WATCH)).toList(); + + if (golderWatches.isEmpty()) { + return new InteractionResponse(false, "Golden watch is not present in your inventory!", new ArrayList<>()); + } + + var golderWatch = golderWatches.getFirst(); + playerItems.remove(golderWatch); + + var item = new Item(ItemType.KEY_FRAGMENT, player); + itemService.addItem(player, item); // itemRepository.save is ran by this function so we don't need to save the player when we removed the item from his inv + + character.setInteractedWith(true); + characterRepository.save(character); + + var items = new ArrayList(); + items.add(item); + + return new InteractionResponse(false, "Díky moc za mé ztracené zlaté hodinky... Doplnit dialog!!!", items); + } +} diff --git a/backend/src/main/java/cz/jzitnik/chronos/services/InitGameService.java b/backend/src/main/java/cz/jzitnik/chronos/services/InitGameService.java index a79424f..9dbb222 100644 --- a/backend/src/main/java/cz/jzitnik/chronos/services/InitGameService.java +++ b/backend/src/main/java/cz/jzitnik/chronos/services/InitGameService.java @@ -14,7 +14,7 @@ public class InitGameService { // Outside var outside = new Room( - "Outside", // Name + "Outside", // Náměstí game ); var outside_characters = new ArrayList(); @@ -109,12 +109,42 @@ public class InitGameService { inn_characters.add(innkeeper); inn.setCharacters(inn_characters); + // Dům starosty + var mayor_house = new Room( + "Dům starosty", + game + ); + var mayor_house_characters = new ArrayList(); + var mayor = new Character( + "Starosta", + mayor_house, + "Ahoj já jsem starosta. Dej mi moje ztracené zlaté hodinky a dám ti fragment klíče." + ); + mayor.setInteraction(Interaction.Mayor); + mayor.setInteractionData(new cz.jzitnik.chronos.entities.Interaction( + "", + "Zlaté hodinky už mám. Děkuji za nalezení.", + mayor + )); + mayor_house_characters.add(mayor); + mayor_house.setCharacters(mayor_house_characters); + + // Zarostlá zahrada + var garden = new Room( + "Zarostlá zahrada", + game + ); + // Zlaté hodinky pro starostu + garden.getItems().add(new Item(ItemType.GOLDEN_WATCH, garden)); + rooms.add(outside); rooms.add(stodola); rooms.add(shop); rooms.add(library); rooms.add(inn); + rooms.add(mayor_house); + rooms.add(garden); game.setRooms(rooms); diff --git a/frontend/src/main/java/cz/jzitnik/Main.java b/frontend/src/main/java/cz/jzitnik/Main.java index 836959c..5b03a63 100644 --- a/frontend/src/main/java/cz/jzitnik/Main.java +++ b/frontend/src/main/java/cz/jzitnik/Main.java @@ -47,7 +47,7 @@ public class Main { } } - Cli.info("Prosím počkejte..."); + Cli.info("Prosím počkejte než hra začne..."); chronos.waitForStart(); Cli.info("Hra začala!"); System.out.println("\n\n"); diff --git a/frontend/src/main/java/cz/jzitnik/api/ApiService.java b/frontend/src/main/java/cz/jzitnik/api/ApiService.java index 33b561c..ef80582 100644 --- a/frontend/src/main/java/cz/jzitnik/api/ApiService.java +++ b/frontend/src/main/java/cz/jzitnik/api/ApiService.java @@ -71,6 +71,11 @@ public interface ApiService { @Query("roomId") Long roomId ); + @POST("game/rooms/take_items") + Call, Error>> takeItemsFromRoom( + @Query("playerKey") String playerKey + ); + @POST("game/characters/take_items") Call> takeItems( @Query("playerKey") String playerKey, diff --git a/frontend/src/main/java/cz/jzitnik/api/types/Interaction.java b/frontend/src/main/java/cz/jzitnik/api/types/Interaction.java index 4c33d28..03e27f6 100644 --- a/frontend/src/main/java/cz/jzitnik/api/types/Interaction.java +++ b/frontend/src/main/java/cz/jzitnik/api/types/Interaction.java @@ -4,5 +4,6 @@ public enum Interaction { Farmer, Cashier, Librarian, - Innkeeper + Innkeeper, + Mayor } diff --git a/frontend/src/main/java/cz/jzitnik/api/types/ItemType.java b/frontend/src/main/java/cz/jzitnik/api/types/ItemType.java index 5178ee8..125fed1 100644 --- a/frontend/src/main/java/cz/jzitnik/api/types/ItemType.java +++ b/frontend/src/main/java/cz/jzitnik/api/types/ItemType.java @@ -5,7 +5,8 @@ import java.util.Set; public enum ItemType { KEY_FRAGMENT, - LUCK_POTION; + LUCK_POTION, + GOLDEN_WATCH; private static final Set usableItems = new HashSet<>(); @@ -22,6 +23,7 @@ public enum ItemType { return switch (this) { case LUCK_POTION -> "Lektvar štěstí"; case KEY_FRAGMENT -> "Fragment klíče"; + case GOLDEN_WATCH -> "Zlaté hodinky"; }; } } diff --git a/frontend/src/main/java/cz/jzitnik/api/types/Room.java b/frontend/src/main/java/cz/jzitnik/api/types/Room.java index 870ee04..10c26cf 100644 --- a/frontend/src/main/java/cz/jzitnik/api/types/Room.java +++ b/frontend/src/main/java/cz/jzitnik/api/types/Room.java @@ -19,7 +19,7 @@ public class Room { @Override public String toString() { if (name.equals("Outside")) { - return "Venek"; + return "Náměstí"; } return name; diff --git a/frontend/src/main/java/cz/jzitnik/game/Chronos.java b/frontend/src/main/java/cz/jzitnik/game/Chronos.java index a32bd5f..7ab1289 100644 --- a/frontend/src/main/java/cz/jzitnik/game/Chronos.java +++ b/frontend/src/main/java/cz/jzitnik/game/Chronos.java @@ -17,6 +17,7 @@ import java.net.ConnectException; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.Objects; @@ -209,14 +210,33 @@ public class Chronos { public void visit(Room room) throws IOException { System.out.println("\n"); if (room.getName().equals("Outside")) { - Cli.info("Nyní jste venku"); + Cli.info("Nyní jste na náměstí."); } else { - Cli.info("Nyní se nacházíte v místnosti " + room.getName()); + Cli.info("Nyní se nacházíte v " + Cli.Colors.BLUE + room.getName() + Cli.Colors.RESET + "."); } + var items = room.getItems(); + if (!items.isEmpty()) { + Cli.info("V místnosti se nachází: " + String.join(", ", items.stream().map(Item::toString).toList())); + var options = new String[] {"Vzít si itemy", "Nebrat si itemy"}; + var selected = Cli.selectOptionIndex(Arrays.asList(options)); + + if (selected == 0) { + var response = apiService.takeItemsFromRoom(localData.getUserSecret()).execute(); + var itemsGot = response.body().getData().get(); + + Cli.gotItems(itemsGot); + + if (itemsGot.size() < items.size()) { + Cli.info("Některé itemy jste nemohl vzít, protože váš inventář je plný."); + } + } + } + + System.out.println(); var characters = room.getCharacters(); if (characters.isEmpty()) { - Cli.type("V místnosti je prázno... Ani jedna duše."); + Cli.type("V místnosti se nenachází jediná duše..."); } else { talk(characters); } diff --git a/frontend/src/main/java/cz/jzitnik/game/interactions/Interactions.java b/frontend/src/main/java/cz/jzitnik/game/interactions/Interactions.java index b475ab1..82813af 100644 --- a/frontend/src/main/java/cz/jzitnik/game/interactions/Interactions.java +++ b/frontend/src/main/java/cz/jzitnik/game/interactions/Interactions.java @@ -1,12 +1,11 @@ package cz.jzitnik.game.interactions; import cz.jzitnik.api.ApiService; -import cz.jzitnik.api.requests.InteractionRequest; import cz.jzitnik.api.types.Character; +import cz.jzitnik.game.interactions.list.*; import cz.jzitnik.utils.Cli; import java.io.IOException; -import java.util.Arrays; public class Interactions { public static void runInteraction(Character character, ApiService apiService, String playerKey) throws IOException { @@ -18,24 +17,14 @@ public class Interactions { return; } - Cli.type(character, interactionData.getStartText()); + if (!interactionData.getStartText().isBlank()) { + Cli.type(character, interactionData.getStartText()); + } switch (character.getInteraction()) { case Farmer -> { - var options = new String[]{"Kámen", "Nůžky", "Papír"}; - var selected = Cli.selectOptionIndex(Arrays.stream(options).toList()); - - var requestData = new InteractionRequest(String.valueOf(selected), character.getId()); - - var res = apiService.interact(playerKey, requestData).execute(); - var interactionResponse = res.body().getData().get(); - - Cli.type(character, interactionResponse.getResponseText()); - - if (interactionResponse.isSuccess()) { - Cli.gotItems(interactionResponse.getItems()); - } - + RockPaperScissors rockPaperScissors = new RockPaperScissors(character, apiService, playerKey); + rockPaperScissors.play(); } case Cashier -> { Hangman hangman = new Hangman(character, apiService, playerKey); @@ -49,6 +38,10 @@ public class Interactions { TicTacToe ticTacToe = new TicTacToe(character, apiService, playerKey); ticTacToe.play(); } + case Mayor -> { + Mayor mayor = new Mayor(character, apiService, playerKey); + mayor.play(); + } } } } diff --git a/frontend/src/main/java/cz/jzitnik/game/interactions/Hangman.java b/frontend/src/main/java/cz/jzitnik/game/interactions/list/Hangman.java similarity index 98% rename from frontend/src/main/java/cz/jzitnik/game/interactions/Hangman.java rename to frontend/src/main/java/cz/jzitnik/game/interactions/list/Hangman.java index de95771..d8008b0 100644 --- a/frontend/src/main/java/cz/jzitnik/game/interactions/Hangman.java +++ b/frontend/src/main/java/cz/jzitnik/game/interactions/list/Hangman.java @@ -1,4 +1,4 @@ -package cz.jzitnik.game.interactions; +package cz.jzitnik.game.interactions.list; import com.fasterxml.jackson.databind.ObjectMapper; import cz.jzitnik.api.ApiService; diff --git a/frontend/src/main/java/cz/jzitnik/game/interactions/list/Mayor.java b/frontend/src/main/java/cz/jzitnik/game/interactions/list/Mayor.java new file mode 100644 index 0000000..1d125ff --- /dev/null +++ b/frontend/src/main/java/cz/jzitnik/game/interactions/list/Mayor.java @@ -0,0 +1,40 @@ +package cz.jzitnik.game.interactions.list; + +import cz.jzitnik.api.ApiService; +import cz.jzitnik.api.requests.InteractionRequest; +import cz.jzitnik.api.types.Character; +import cz.jzitnik.api.types.ItemType; +import cz.jzitnik.utils.Cli; +import lombok.AllArgsConstructor; + +import java.io.IOException; +import java.util.Arrays; + + +@AllArgsConstructor +public class Mayor { + private Character character; + private ApiService apiService; + private String playerKey; + + public void play() throws IOException { + var response = apiService.getMe(playerKey).execute(); + var me = response.body().getData().get(); + + if (!me.getInventory().stream().anyMatch(item -> item.getItemType().equals(ItemType.GOLDEN_WATCH))) { + // Player does not have golden watch + return; + } + + var options = new String[]{"Dát starostovi zlaté hodinky", "Nedát starostovi zlaté hodinky"}; + var selected = Cli.selectOptionIndex(Arrays.stream(options).toList()); + + if (selected == 0) { + var res = apiService.interact(playerKey, new InteractionRequest("", character.getId())).execute(); + var data = res.body().getData().get(); + + Cli.type(character, data.getResponseText()); + Cli.gotItems(data.getItems()); + } + } +} diff --git a/frontend/src/main/java/cz/jzitnik/game/interactions/list/RockPaperScissors.java b/frontend/src/main/java/cz/jzitnik/game/interactions/list/RockPaperScissors.java new file mode 100644 index 0000000..352ddb1 --- /dev/null +++ b/frontend/src/main/java/cz/jzitnik/game/interactions/list/RockPaperScissors.java @@ -0,0 +1,34 @@ +package cz.jzitnik.game.interactions.list; + +import cz.jzitnik.api.ApiService; +import cz.jzitnik.api.requests.InteractionRequest; +import cz.jzitnik.api.types.Character; +import cz.jzitnik.utils.Cli; +import lombok.AllArgsConstructor; + +import java.io.IOException; +import java.util.Arrays; + + +@AllArgsConstructor +public class RockPaperScissors { + private Character character; + private ApiService apiService; + private String playerKey; + + public void play() throws IOException { + var options = new String[]{"Kámen", "Nůžky", "Papír"}; + var selected = Cli.selectOptionIndex(Arrays.stream(options).toList()); + + var requestData = new InteractionRequest(String.valueOf(selected), character.getId()); + + var res = apiService.interact(playerKey, requestData).execute(); + var interactionResponse = res.body().getData().get(); + + Cli.type(character, interactionResponse.getResponseText()); + + if (interactionResponse.isSuccess()) { + Cli.gotItems(interactionResponse.getItems()); + } + } +} diff --git a/frontend/src/main/java/cz/jzitnik/game/interactions/TicTacToe.java b/frontend/src/main/java/cz/jzitnik/game/interactions/list/TicTacToe.java similarity index 99% rename from frontend/src/main/java/cz/jzitnik/game/interactions/TicTacToe.java rename to frontend/src/main/java/cz/jzitnik/game/interactions/list/TicTacToe.java index 8f9921c..4e69192 100644 --- a/frontend/src/main/java/cz/jzitnik/game/interactions/TicTacToe.java +++ b/frontend/src/main/java/cz/jzitnik/game/interactions/list/TicTacToe.java @@ -1,4 +1,4 @@ -package cz.jzitnik.game.interactions; +package cz.jzitnik.game.interactions.list; import com.fasterxml.jackson.databind.ObjectMapper; import cz.jzitnik.api.ApiService; diff --git a/frontend/src/main/java/cz/jzitnik/game/interactions/Wordle.java b/frontend/src/main/java/cz/jzitnik/game/interactions/list/Wordle.java similarity index 98% rename from frontend/src/main/java/cz/jzitnik/game/interactions/Wordle.java rename to frontend/src/main/java/cz/jzitnik/game/interactions/list/Wordle.java index df96c27..f213462 100644 --- a/frontend/src/main/java/cz/jzitnik/game/interactions/Wordle.java +++ b/frontend/src/main/java/cz/jzitnik/game/interactions/list/Wordle.java @@ -1,4 +1,4 @@ -package cz.jzitnik.game.interactions; +package cz.jzitnik.game.interactions.list; import com.fasterxml.jackson.databind.ObjectMapper; import cz.jzitnik.api.ApiService; @@ -12,7 +12,6 @@ import lombok.Getter; import java.io.Console; import java.io.IOException; import java.util.List; -import java.util.stream.Collectors; @AllArgsConstructor public class Wordle {