public static void main(String[] args) {
		for(String s: args) {
			if(s.startsWith("-d")) diff = s.substring(2);
			if(s.startsWith("-tw64")) func = new Tworojok64HashFunction();
			try {
				if(s.startsWith("-p")) port = Short.parseShort(s.substring(2));
			} catch(NumberFormatException e) {
			}
		}
		
		System.err.println("Starting MineGame server");
		state = "Open"; stateTicks = DEFAULT_TICKS;
		roundID = generateID();
		new GameServer().start();
		
		try(ServerSocket ss = new ServerSocket(port)) {
			while(true) {
				try {
				    Socket usrSock = ss.accept();
					users.add(new User(usrSock));
					System.err.println(usrSock.getInetAddress() + " - connetcion established");
				} catch(Exception e) {
					System.err.println("Can't accept user socket");
					e.printStackTrace();
				}
			}
		} catch(Exception e) {
			e.printStackTrace();
		}
	}