Some bugs in minimax ... getting closer though.