Last active
July 30, 2020 00:44
-
-
Save dynoChris/e1d36a23d96707a80e55e67072215543 to your computer and use it in GitHub Desktop.
Switcher pattern
This file contains 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
int switcher = 0; | |
int countLaps = 3; | |
switch (switcher) { | |
case 0: | |
switcher = (switcher+1)%countLaps; | |
break; | |
case 1: | |
switcher = (switcher+1)%countLaps; | |
break; | |
case 2: | |
switcher = (switcher+1)%countLaps; | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment