added minimax algorithm - still need to deal with depth