summaryrefslogtreecommitdiff
path: root/shared/src/main/java/kz/ilotterytea/frogartha/utils/SerializerUtils.java
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-01-22 04:11:41 +0500
committerilotterytea <iltsu@alright.party>2025-01-22 04:11:41 +0500
commit449c70cbf900a80042f70dd8929f302f0f0016d7 (patch)
treecd958299e1a421165c370cb31500315f0635560c /shared/src/main/java/kz/ilotterytea/frogartha/utils/SerializerUtils.java
parentb96a6d7005fcb90a21aeb21ddebe8bb7b82a7ef5 (diff)
feat: MULTIPLAYER!!!!!!!!!!!!!!! LETS FUCKING GOOOOOOOO!!!!!
Diffstat (limited to 'shared/src/main/java/kz/ilotterytea/frogartha/utils/SerializerUtils.java')
-rw-r--r--shared/src/main/java/kz/ilotterytea/frogartha/utils/SerializerUtils.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/shared/src/main/java/kz/ilotterytea/frogartha/utils/SerializerUtils.java b/shared/src/main/java/kz/ilotterytea/frogartha/utils/SerializerUtils.java
index 2df2acf..e005937 100644
--- a/shared/src/main/java/kz/ilotterytea/frogartha/utils/SerializerUtils.java
+++ b/shared/src/main/java/kz/ilotterytea/frogartha/utils/SerializerUtils.java
@@ -3,20 +3,28 @@ package kz.ilotterytea.frogartha.utils;
import com.github.czyzby.websocket.serialization.impl.ManualSerializer;
import kz.ilotterytea.frogartha.domain.Identity;
import kz.ilotterytea.frogartha.domain.actions.ChangedDirectionAction;
+import kz.ilotterytea.frogartha.domain.actions.JoinRoomAction;
+import kz.ilotterytea.frogartha.domain.actions.LeaveRoomAction;
import kz.ilotterytea.frogartha.domain.actions.PlayerJumpAction;
-import kz.ilotterytea.frogartha.domain.events.ChangedDirectionEvent;
-import kz.ilotterytea.frogartha.domain.events.PlayerJumpEvent;
-import kz.ilotterytea.frogartha.domain.server.Acknowledge;
+import kz.ilotterytea.frogartha.domain.events.*;
import kz.ilotterytea.frogartha.exceptions.PlayerKickException;
public class SerializerUtils {
public static void registerTypes(ManualSerializer serializer) {
- serializer.register(new Acknowledge());
serializer.register(new Identity());
serializer.register(new PlayerKickException());
serializer.register(new PlayerJumpAction());
serializer.register(new PlayerJumpEvent());
serializer.register(new ChangedDirectionAction());
serializer.register(new ChangedDirectionEvent());
+ serializer.register(new IdentifiedEvent());
+
+ serializer.register(new JoinRoomAction());
+ serializer.register(new PlayerJoinedRoomEvent());
+ serializer.register(new SenderJoinedRoomEvent());
+
+ serializer.register(new LeaveRoomAction());
+ serializer.register(new PlayerLeftRoomEvent());
+ serializer.register(new SenderLeftRoomEvent());
}
}