-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
2,030 additions
and
171 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
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
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
6 changes: 6 additions & 0 deletions
6
backend/src/main/java/fr/zelytra/game/pool/data/GameAction.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,6 @@ | ||
package fr.zelytra.game.pool.data; | ||
|
||
import java.util.List; | ||
|
||
public record GameAction(int roundId, List<PoolBalls> balls, List<PoolFault> faults, String username) { | ||
} |
20 changes: 20 additions & 0 deletions
20
backend/src/main/java/fr/zelytra/game/pool/data/GameReport.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,20 @@ | ||
package fr.zelytra.game.pool.data; | ||
|
||
import java.util.List; | ||
|
||
public record GameReport(List<GameReportPlayer> victoryPlayer, List<GameReportPlayer> looserPlayer) { | ||
|
||
public GameReportPlayer getFromUsername(String username) { | ||
for (GameReportPlayer victoryPlayer : victoryPlayer) { | ||
if (victoryPlayer.username().equals(username)) { | ||
return victoryPlayer; | ||
} | ||
} | ||
for (GameReportPlayer looserPlayer : looserPlayer) { | ||
if (looserPlayer.username().equals(username)) { | ||
return looserPlayer; | ||
} | ||
} | ||
return null; | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
backend/src/main/java/fr/zelytra/game/pool/data/GameReportPlayer.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,4 @@ | ||
package fr.zelytra.game.pool.data; | ||
|
||
public record GameReportPlayer(int previousPP, int pp, String username) { | ||
} |
2 changes: 1 addition & 1 deletion
2
.../java/fr/zelytra/game/pool/GameRules.java → .../fr/zelytra/game/pool/data/GameRules.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package fr.zelytra.game.pool; | ||
package fr.zelytra.game.pool.data; | ||
|
||
public enum GameRules { | ||
AMERICAN_8(6); | ||
|
2 changes: 1 addition & 1 deletion
2
...java/fr/zelytra/game/pool/GameStatus.java → ...fr/zelytra/game/pool/data/GameStatus.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package fr.zelytra.game.pool; | ||
package fr.zelytra.game.pool.data; | ||
|
||
public enum GameStatus { | ||
SETUP, | ||
|
Oops, something went wrong.