From 1348e342d6ec3685424244ceae6d920652239555 Mon Sep 17 00:00:00 2001 From: punchready Date: Tue, 18 May 2021 18:14:03 +0200 Subject: [PATCH] refactor: removed deprecated checksum --- .../gamelogic/ChecksumCalculator.java | 24 ------------------- .../gamelibrary/gamelogic/GameInstance.java | 17 ------------- 2 files changed, 41 deletions(-) delete mode 100644 src/main/java/uulm/teamname/marvelous/gamelibrary/gamelogic/ChecksumCalculator.java diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/gamelogic/ChecksumCalculator.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/gamelogic/ChecksumCalculator.java deleted file mode 100644 index d170369..0000000 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/gamelogic/ChecksumCalculator.java +++ /dev/null @@ -1,24 +0,0 @@ -package uulm.teamname.marvelous.gamelibrary.gamelogic; - -/** Contains checksum calculations. */ -class ChecksumCalculator { - /** - * Compares a checksum to the checksum of a {@link GameState}. - * @param state The state to check - * @param input the checksum to compare to - * @return Whether or not the checksum matches the state's checksum - */ - public static boolean checkChecksum(GameState state, long input) { - return calculateChecksum(state) == input; - } - - /** - * Calculates the corresponding checksum to a {@link GameState}. - * @param state The state to check - * @return The checksum - */ - public static long calculateChecksum(GameState state) { - //TODO: implement ChecksumCalculator.calculateChecksum - return 0; - } -} diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/gamelogic/GameInstance.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/gamelogic/GameInstance.java index a1d7ee6..477fb70 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/gamelogic/GameInstance.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/gamelogic/GameInstance.java @@ -28,23 +28,6 @@ public class GameInstance { manager = new GameStateManager(_state); } - /** - * Checks a checksum with the current one. - * @param input The checksum to compare to - * @return Whether or not the checksum matches - */ - public boolean checkChecksum(long input) { - return ChecksumCalculator.checkChecksum(_state, input); - } - - /** - * Calculates the current checksum of the game state. - * @return The calculated checksum - */ - public long calculateChecksum() { - return ChecksumCalculator.calculateChecksum(_state); - } - /** * Checks an array of {@link Request}s for validity and automatically applies them if valid. * @param requests The requests to check