public MetaRoom(RoomType roomType, RoomMessageManaer messageManaer, List <RoomRole> roles) { this.id = CommonUtil.getUUID(); this.messageManaer = messageManaer; this.roomType = roomType; this.roles = roles; }
public RoomTwoPlayer(RoomType roomType, RoomMessageManaer messageManaer, List <RoomRole> roles) : base(roomType, messageManaer, roles) { if (RoomType.TWO_PLAYER != roomType) { throw new Exception("要求创建的房间类型不匹配"); } if (roles.Count != 2) { throw new Exception("要求创建的人数不符合"); } this.playerOne = (TwoPlayerRoomRole)roles[0]; this.playerTwo = (TwoPlayerRoomRole)roles[1]; }
public Room(RoomType roomType, RoomMessageManaer messageManaer, List <RoomRole> roles) : base(roomType, messageManaer, roles) { }