Added faster win checker and fixed heuristic bugs.
Fixed merge conflict.