implemented minimax with basic eval