rough draft of a minimax algo. Needs work