Created
September 10, 2016 00:40
-
-
Save anonymous/4c70b77dd62cceece17982c826b28b97 to your computer and use it in GitHub Desktop.
BrokenBunnyAnimation
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
public class ModulusAnimation | |
{ | |
public static void main( String[] args ) throws Exception | |
{ | |
// creates loop to run until i = 80, adding 1 or 10 (not certain) to i after each loop | |
for ( int i=0; i<80; i++ ) | |
{ | |
//this one checks that 10 goes into i with 1 left over | |
//the next will check that 10 goes into i with 2 left over | |
//and so on | |
if ( i%10 == 0 ) | |
System.out.print("() () ___\n(>x>) <_|_}<\r"); | |
else if ( i%10 == 1 ) | |
System.out.print(" () () ___\n (oxo) <_|_}<\r"); | |
else if ( i%10 == 2 ) | |
System.out.print(" () () ___\n (oxo) <_|_}<\r"); | |
else if ( i%10 == 3 ) | |
System.out.print(" () () ___\n (ooo)<_|_}<\r"); | |
else if ( i%10 == 4 ) | |
System.out.print(" () () _\n (-w-)3_}<\r"); | |
else if ( i%10 == 5 ) | |
System.out.print(" () () \n (-o-)3}<\r"); | |
else if ( i%10 == 6 ) | |
System.out.print(" () () \n (-x-)\r"); | |
else if ( i%10 == 7 ) | |
System.out.print(" () () \n (-x-)\r"); | |
else if ( i%10 == 8 ) | |
System.out.print(" () () \n (-x-)\r"); | |
else if ( i%10 == 9 ) | |
System.out.print("() () \n(-x-)\r"); | |
else if ( i%10 == 10 ) | |
System.out.print("() () ___\n(-x-) <_|_}<\r"); | |
else if ( i%10 == 11 ) | |
System.out.print("() () ___\n(oxo) <_|_}<\r"); | |
//this one sleeps for 200 ms | |
Thread.sleep(200); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment