public SmashServer(SmashGame gamer, Map map){
		this.game=gamer;
		game.init(map, this);
		instance = this;
		try {
			setServer(new ServerSocket(328));
		} catch (IOException e) {
			e.printStackTrace();
		}
		new Thread(new Runnable(){
			@Override
			public void run() {
				while(getMAX_PLAYERS()==10)
					try {
						Thread.sleep(50);
					} catch (InterruptedException e1) {
						e1.printStackTrace();
					}
				while(players < getMAX_PLAYERS()){
					try {
						Socket socket = server.accept();
						socket.setKeepAlive(true);
						clients[players-1] = new SmashClientHost(socket, instance);
						sendMap(game.getMap().getPath(), players-1);
						players++;
						transfer(PLAYER_NUM+" "+players+" "+MAX_PLAYERS);
					} catch (IOException e) {
						break;
					}
					if(getMAX_PLAYERS() == 1)
						break;
				}
				if(getMAX_PLAYERS() == 1)
					start();
			}
		},"Smash It Server").start();
	}