Created
April 29, 2019 09:31
-
-
Save rubdottocom/6267547a37f555d09d7a0784f4e6d14b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Originally posted on: https://rubdotto.com/clean-code-desinformaci%C3%B3n/ | |
findDragonBall() | |
findDragonBalls() | |
findDragonBells() | |
findDragonWithBalls() | |
findDragonWithBalletSlippers() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Originally posted on: https://rubdotto.com/clean-code-desinformaci%C3%B3n/ | |
public class dummy { | |
int radarMode = 0; // 0 find Dragon Balls, 1 find Dragon | |
ArrayList<DragonBall> dragonBalls = new ArrayList<DragonBall>(); | |
Shenron dragon = null; | |
private void onClick(int numberOfClickDone) { | |
if (numberOfClickDone == 1) { | |
if (radarMode == 0) { | |
dragonBalls = findDragonBall(); | |
} else { | |
dragonBalls = findDragonBells(); | |
} | |
} else if (numberOfClickDone == 2) { | |
if (radarMode == 0) { | |
dragon = findDragonWithBells(); | |
} else { | |
dragon = findDragonWithBalletSlippers(); | |
} | |
} else if (numberOfClickDone > 2) { | |
if (radarMode == 0) | |
radarMode = 1; | |
else | |
radarMode = 0; | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Originally posted on: https://rubdotto.com/clean-code-desinformaci%C3%B3n/ | |
findDragonBall() -> findSingleDragonBall() | |
findDragonBalls() -> findAllDragonBalls() | |
findDragonBells() -> findDragonJingleBells() | |
findDragonWithBalls() -> findDragonAndDragonBalls() | |
findDragonWithBalletSlippers() -> findDragonPracticingBallet() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment