Update BitGameCanvas.java

This commit is contained in:
2025-12-05 22:08:45 +01:00
parent 449387c8ed
commit b33c85419c

View File

@@ -11,12 +11,10 @@ import javafx.util.Duration;
import org.toop.framework.eventbus.EventFlow; import org.toop.framework.eventbus.EventFlow;
import org.toop.framework.gameFramework.model.game.TurnBasedGame; import org.toop.framework.gameFramework.model.game.TurnBasedGame;
import org.toop.framework.gameFramework.view.GUIEvents; import org.toop.framework.gameFramework.view.GUIEvents;
import org.toop.game.BitboardGame;
import java.util.Arrays;
import java.util.function.Consumer; import java.util.function.Consumer;
public abstract class BitGameCanvas<T extends BitboardGame<T>> implements GameCanvas<T> { public abstract class BitGameCanvas<T extends TurnBasedGame<T>> implements GameCanvas<T> {
protected record Cell(float x, float y, float width, float height) { protected record Cell(float x, float y, float width, float height) {
public boolean isInside(double x, double y) { public boolean isInside(double x, double y) {
return x >= this.x && x <= this.x + width && return x >= this.x && x <= this.x + width &&