Working on minimax, still not functioning completely