Created
April 10, 2014 07:41
-
-
Save 0minus273/10352571 to your computer and use it in GitHub Desktop.
ass
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
1 class Bouncer f | |
2 public static nal int DOWN = 0; | |
3 public static nal int RIGHT = 1; | |
4 public static nal int STOP = 2; | |
5 private boolean goRight = false; | |
6 private ThreadLocal<Integer> myIndex; | |
7 private int last = 1; | |
8 int visit () f | |
9 int i = myIndex.get(); | |
10 last = i; | |
11 if (goRight) | |
12 return RIGHT; | |
13 goRight = true; | |
14 if ( last == i) | |
15 return STOP; | |
16 else | |
17 return DOWN; | |
18 g | |
19 g |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment