using MauMau_Server.Websockets; namespace MauMau_Server.Room; public abstract class RoomType { protected readonly Room _room; protected RoomType(Room room) { _room = room; } /** * * This method is called when a message is received from a ConnectionInstance * * The ConnectionInstance that sent the message * The message received */ public abstract void OnMessage(ConnectionInstance sender, RoomMessage message); /** * * This method is called when a new ConnectionInstance is added to the Room. * * The ConnectionInstance that was added to the Room */ public abstract void OnConnect(ConnectionInstance connection); /** * * This method is called when a ConnectionInstance is either removed from the Room or the ConnectionInstance's WebSocket is closed. * * The ConnectionInstance that was removed from the Room */ public abstract void OnDisconnect(ConnectionInstance connection); }