Revision 4f470e00
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/uistate/RubikState.java | ||
---|---|---|
29 | 29 |
MAIN ( null , new RubikStateMain() ), |
30 | 30 |
PLAY ( MAIN , new RubikStatePlay() ), |
31 | 31 |
SOLV ( PLAY , new RubikStateSolving() ), |
32 |
PATT ( MAIN , new RubikStatePattern() ), |
|
32 | 33 |
; |
33 | 34 |
|
34 | 35 |
public static final int LENGTH = values().length; |
... | ... | |
99 | 100 |
|
100 | 101 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
101 | 102 |
|
102 |
public static void switchState(RubikActivity act, RubikState state)
|
|
103 |
public static void switchState(RubikActivity act, RubikState next)
|
|
103 | 104 |
{ |
104 |
if( state!=null )
|
|
105 |
if( next!=null )
|
|
105 | 106 |
{ |
106 | 107 |
if( mCurrState!=null ) mCurrState.leaveState(act); |
107 |
state.enterState(act,mCurrState);
|
|
108 |
next.enterState(act,mCurrState);
|
|
108 | 109 |
mPrevState = mCurrState; |
109 |
mCurrState = state;
|
|
110 |
mCurrState = next;
|
|
110 | 111 |
} |
111 | 112 |
else |
112 | 113 |
{ |
Also available in: Unified diff
Progress with Pretty Patterns.