Added gameover and heuristics