-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #187 : Transactions crash and budget according current proposals
- Loading branch information
Showing
9 changed files
with
3,310 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/org/blondin/mpg/root/model/PlayerStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
package org.blondin.mpg.root.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
|
||
public enum PlayerStatus { | ||
|
||
BUY(2), PROPOSAL(1); | ||
|
||
private final int value; | ||
|
||
private PlayerStatus(final int value) { | ||
this.value = value; | ||
} | ||
|
||
@JsonCreator | ||
public static PlayerStatus getNameByValue(final int value) { | ||
for (final PlayerStatus s : PlayerStatus.values()) { | ||
if (s.value == value) { | ||
return s; | ||
} | ||
} | ||
throw new UnsupportedOperationException(String.format("Player status not supported: %s", value)); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
src/test/resources/__files/mpg.transfer.buy.MN7VSYBM.20210406.json
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.