finished refactoring minimax; now working on tests