Here you can find the source of hash(long mover, long enemy)
public static long hash(long mover, long enemy)
//package com.java2s; /*/*w w w . java 2 s. c om*/ * Copyright (c) 2014 Chris Welty. * * This is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 3, * as published by the Free Software Foundation. * * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * For the license, see <http://www.gnu.org/licenses/gpl.html>. */ public class Main { /** * Hash 2 longs into a single long, using a mixing function derived from Murmur. * * @return hash */ public static long hash(long mover, long enemy) { final long a = murmurMix(mover ^ murmurMix(enemy)); return a ^ (a >>> 47); } /** * Index of units char in prefixes */ private static long murmurMix(long h) { h *= 0xc6a4a7935bd1e995L; h ^= h >>> 47 | h << 17; h *= 0xc6a4a7935bd1e995L; return h; } }