diff --git a/mavenmcserver/src/main/java/mavenmcserver/game/GameConfig.java b/mavenmcserver/src/main/java/mavenmcserver/game/GameConfig.java index ec69eb1..8b79026 100644 --- a/mavenmcserver/src/main/java/mavenmcserver/game/GameConfig.java +++ b/mavenmcserver/src/main/java/mavenmcserver/game/GameConfig.java @@ -26,7 +26,7 @@ public class GameConfig { static String ERROR_OPPONENT_PLAYER_NULL = "Couldn't add the opponent player to the game."; static String ERROR_PLAYER_ALREADY_IN_GAME = "You are currently playing a game of tic-tac-toe and, thus, cannot start another one."; static String ERROR_WIN_REQUIRED_AMOUNT_TOO_SMALL = "The required win amount must not be smaller than " + GameConfig.MIN_WIN_REQUIRED_AMOUNT; - static String ERROR_WIN_REQUIRED_AMOUNT_TOO_LARGE = "The required win amount must not be larger than the size's largest dimension."; + static String ERROR_WIN_REQUIRED_AMOUNT_TOO_LARGE = "The required win amount must not be larger than the size's largest dimension (%d)."; /** * The player who started the game @@ -108,7 +108,7 @@ List validateNumbersReturningErrors(int maxDimensionSize) { } if(this.winRequiredAmount > this.getLargestDimension()) { - errors.add(GameConfig.ERROR_WIN_REQUIRED_AMOUNT_TOO_LARGE); + errors.add(String.format(GameConfig.ERROR_WIN_REQUIRED_AMOUNT_TOO_LARGE, this.getLargestDimension())); } if(this.winRequiredAmount < GameConfig.MIN_WIN_REQUIRED_AMOUNT) {