Timeline for Another Rock Paper Scissors in plain JavaScript
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 2, 2015 at 15:45 | history | edited | Eliseu Monar dos Santos | CC BY-SA 3.0 |
edited body
|
Feb 2, 2015 at 12:26 | vote | accept | Mohamad | ||
Jan 6, 2015 at 13:51 | comment | added | Eliseu Monar dos Santos | @Mohamad, my-stage is an element that holds gameScreen, nameScreen and titleScreen. You only need one stage object with 3 different states, that's the point. Then, instead of calling toTitleScreen, you would change to the TitleScreenState and inside its enter method you would mutate styles (example): stage.element.getElementByClassName('game-screen').style.display = none; | |
Jan 6, 2015 at 13:42 | history | edited | Eliseu Monar dos Santos | CC BY-SA 3.0 |
"changeState" is better than "switchState"
|
Jan 5, 2015 at 18:14 | comment | added | Mohamad | It's also not immediately clear how to a previous stage becomes hidden... | |
Jan 5, 2015 at 17:54 | comment | added | Mohamad | Great review thanks. I have a hard time following your state machine. Doesn't the state need to be attached to a dom element? Your example shows 'my-stage' being passed in. What does mystage refer to? The screen I want to show? So I would have to create 3 Stage objects for each element? Do you mind clarifying this a little? | |
Jan 3, 2015 at 20:41 | history | edited | Eliseu Monar dos Santos | CC BY-SA 3.0 |
added 521 characters in body
|
Jan 3, 2015 at 20:33 | review | First posts | |||
Jan 3, 2015 at 20:37 | |||||
Jan 3, 2015 at 20:28 | history | answered | Eliseu Monar dos Santos | CC BY-SA 3.0 |