fixes available spaces method
minimax is working