import { MessagePairRegistry } from './MessagePairBase';
import { LoginMessagePair } from './Pair/LoginMessagePair';
import { MoveMessagePair } from './Pair/MoveMessagePair';
import { SendMessagePair } from './Pair/SendMessagePair';

/**
 * 消息对初始化
 * 在应用启动时调用此函数注册所有消息对
 */
export function initMessagePairs(): void {
    const registry = MessagePairRegistry.getInstance();

    // 注册登录消息对
    registry.register(new LoginMessagePair());

    // 注册移动消息对
    registry.register(new MoveMessagePair());

    // 注册发送消息对
    registry.register(new SendMessagePair());

    console.log('[MessagePairs] All message pairs registered successfully');
}