Timeline for Method waits for user action
Current License: CC BY-SA 3.0
3 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 1, 2014 at 20:55 | comment | added | Rossco | I understand what you're saying, however there is no 'game loop'. Each round is initiated manually by the user (by pressing a button which calls PlayRound). The button is only active when all players are ready. Its not perfect but since I'm only supposed to demonstrate that I can use class inheritance I think its going to suffice for the moment. I might post the code to GitHub when the assignment is over. | |
| Oct 1, 2014 at 20:27 | comment | added | dcgregorya | It's probably fine for your assignment but in a real company you'd get criticized for "bleeding business logic" and having to "force the workflow to move". A normal game loop is reactive not prescriptive and thus, regardless of entry point should work properly. Here your consumer must call 'IsReady' until it succeeds (and know the next step to make it succeed) or they will get an exception. If it needs to know your workflow you've broken the encapsulation boundaries essentially. | |
| Oct 1, 2014 at 4:33 | history | answered | Rossco | CC BY-SA 3.0 |