Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void revealEmpty(NumericMine mine) {
- ArrayList<NumericMine> tmp = new ArrayList<NumericMine>();
- mineLoop(tmp, mine);
- }
- private void mineLoop(ArrayList<NumericMine> tmp, NumericMine mine) {
- ArrayList<NumericMine> links = mine.getLinks();
- if (links != null) {
- for (NumericMine nm : links) {
- if (!tmp.contains(nm)) {
- tmp.add(nm);
- if (nm.getNr() == 0) {
- mineLoop(tmp, nm);
- }
- nm.setActive(false);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement