Big Refactor + Wrong Minimax Implementation