Disabled error prone for now. Improved eventflow speed

This commit is contained in:
lieght
2025-09-24 22:04:00 +02:00
parent e6e11a3604
commit 7431d1b03f
21 changed files with 564 additions and 393 deletions

View File

@@ -32,9 +32,30 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.14.1</version>
<configuration>
<source>25</source>
<target>25</target>
<release>25</release>
<encoding>UTF-8</encoding>
<!-- <compilerArgs>-->
<!-- <arg>-XDcompilePolicy=simple</arg>-->
<!-- <arg>&#45;&#45;should-stop=ifError=FLOW</arg>-->
<!-- <arg>-Xplugin:ErrorProne</arg>-->
<!-- </compilerArgs>-->
<!-- <annotationProcessorPaths>-->
<!-- <path>-->
<!-- <groupId>com.google.errorprone</groupId>-->
<!-- <artifactId>error_prone_core</artifactId>-->
<!-- <version>2.42.0</version>-->
<!-- </path>-->
<!-- &lt;!&ndash; Other annotation processors go here.-->
<!-- If 'annotationProcessorPaths' is set, processors will no longer be-->
<!-- discovered on the regular -classpath; see also 'Using Error Prone-->
<!-- together with other annotation processors' below. &ndash;&gt;-->
<!-- </annotationProcessorPaths>-->
<!-- <fork>true</fork>-->
</configuration>
</plugin>
</plugins>

View File

@@ -7,7 +7,7 @@ import javax.swing.*;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.toop.framework.eventbus.EventFlow;
import org.toop.framework.eventbus.events.NetworkEvents;
import org.toop.framework.networking.events.NetworkEvents;
import org.toop.tictactoe.LocalTicTacToe;
import org.toop.framework.networking.NetworkingGameClientHandler;
import org.toop.tictactoe.gui.UIGameBoard;

View File

@@ -1,25 +1,25 @@
package org.toop.events;
import org.toop.framework.eventbus.events.EventWithoutUuid;
import org.toop.framework.eventbus.events.Events;
import org.toop.framework.eventbus.events.EventWithoutSnowflake;
import org.toop.framework.eventbus.events.EventsBase;
public class WindowEvents extends Events {
public class WindowEvents extends EventsBase {
/** Triggers when a cell is clicked in one of the game boards. */
public record CellClicked(int cell) implements EventWithoutUuid {}
public record CellClicked(int cell) implements EventWithoutSnowflake {}
/** Triggers when the window wants to quit. */
public record OnQuitRequested() implements EventWithoutUuid {}
public record OnQuitRequested() implements EventWithoutSnowflake {}
/** Triggers when the window is resized. */
// public record OnResize(Window.Size size) implements EventWithoutUuid {}
// public record OnResize(Window.Size size) implements EventWithoutSnowflake {}
/** Triggers when the mouse is moved within the window. */
public record OnMouseMove(int x, int y) implements EventWithoutUuid {}
public record OnMouseMove(int x, int y) implements EventWithoutSnowflake {}
/** Triggers when the mouse is clicked within the window. */
public record OnMouseClick(int button) implements EventWithoutUuid {}
public record OnMouseClick(int button) implements EventWithoutSnowflake {}
/** Triggers when the mouse is released within the window. */
public record OnMouseRelease(int button) implements EventWithoutUuid {}
public record OnMouseRelease(int button) implements EventWithoutSnowflake {}
}

View File

@@ -5,12 +5,10 @@ import java.util.concurrent.*;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.toop.framework.eventbus.EventFlow;
import org.toop.framework.eventbus.events.Events;
import org.toop.framework.eventbus.events.NetworkEvents;
import org.toop.framework.networking.events.NetworkEvents;
import org.toop.game.GameBase;
import org.toop.tictactoe.gui.UIGameBoard;
import org.toop.framework.networking.NetworkingGameClientHandler;
import org.toop.tictactoe.TicTacToeAI;
import java.util.function.Supplier;