miniMax implemented