initial outline of minmax algorithm