refactor: removed deprecated checksum
This commit is contained in:
parent
a6e90ef0f4
commit
1348e342d6
@ -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;
|
||||
}
|
||||
}
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user