minimax algorithm #1

Algorithm sketched out