Minimax implementation without heuristic function.
Prepare for full rewrite