package room

import (
	"game/common/baseroom"
	"game/common/proto/pb"
	"game/common/userBindService"
	"github.com/fox/fox/service"
)

type RoomFactory struct {
}

func (r *RoomFactory) CreateRoom(id, roomType int, srv service.IService, userMgr *baseroom.PlayerMgr, bindService *userBindService.UserBindService) (baseroom.IRoom, pb.ErrCode) {
	return newColorRoom(id, roomType, srv, userMgr, bindService)
}

func GetPlayer(p baseroom.IPlayer) *ColorPlayer {
	player, _ := p.(*ColorPlayer)
	return player
}
