//
//  RoomSettings.m
//  SFS2X
//
//  Original development by Infosfer Game Technologies Ltd. | http://www.infosfer.com.
//
//  Maintained and developed by A51 Integrated.
//  Copyright 2012 A51 Integrated | http://a51integrated.com. All rights reserved.
//

#import "RoomSettings.h"
#import "SFSConstants.h"

@implementation RoomSettings

@synthesize name = _name;
@synthesize password = _password;
@synthesize groupId = _groupId;
@synthesize isGame = _isGame;
@synthesize maxUsers = _maxUsers;
@synthesize maxSpectators = _maxSpectators;
@synthesize maxVariables = _maxVariables;
@synthesize variables = _variables;
@synthesize permissions = _permissions;
@synthesize events = _events;
@synthesize extension = _extension;
@synthesize allowOwnerOnlyInvitation = _allowOwnerOnlyInvitation;



-(id)initWithName:(NSString *)name {
	
	if((self = [super init])){
		self.name = name;
		self.password = @"";
		_isGame = NO;
		_maxUsers = 10;
		_maxSpectators = 0;
		_maxVariables = 5;
        _allowOwnerOnlyInvitation = YES;
		self.groupId = SFSConstants_DEFAULT_GROUP_ID;
	}

	return self;
}

+(id)settingsWithName:(NSString *)name {
	RoomSettings *settings = [[RoomSettings alloc] initWithName:name];
	return settings;
}

@end
