Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
lscgh committed Feb 5, 2024
1 parent 1204857 commit 1fb1990
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions mavenmcserver/src/main/java/mavenmcserver/game/GameState.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,21 @@ public boolean applyGravityTick(Location gameStartBlock, FieldPoint lastPlacePos
*/
FieldState getWinnerIfAny(int winRequiredAmount, FieldPoint lastChanged) {

System.out.println("State at lastChanged=" + this.getStateAt(lastChanged));
try {
Bukkit.getLogger().info("State at lastChanged=" + this.getStateAt(lastChanged));
} catch(Throwable e) {}

for(Vector3i direction: GameState.DIRECTIONS_TO_CHECK) {

System.out.println("Current direction=" + direction);
try {
Bukkit.getLogger().info("Current direction=" + direction);
} catch(Throwable e) {}

int amountOfCorrectFields = this.getFieldsInARowCount(lastChanged, direction);

System.out.println("Amount=" + amountOfCorrectFields);
try {
Bukkit.getLogger().info("Amount=" + amountOfCorrectFields);
} catch(Throwable e) {}

if(amountOfCorrectFields >= winRequiredAmount) return this.getStateAt(lastChanged);
else if(amountOfCorrectFields > 1) {
Expand Down

0 comments on commit 1fb1990

Please sign in to comment.