Bug Fix in minimax function and printing result