finished first draft of minimax algorithm to test