@Jimmy i agree and that was partially my dilemma, since the code that examined my state transitions was only triggered by user actions it seemed unnatural for there to be a state that could start and finish without any user action
@TheMaskedRebel use someone else's code and create a tutorial about it :p
@Jimmy yeah, I guess it something like "if it's not broken, don't look into it"... I never had to look into this before last week, where I was not able to request 364 bytes..
When implementing the icommand and state patterns, where should command verification take place? For example, if I am programming a card game that translates typed commands into program commands, I want to be verify that the actual command is allowed based on game/state rules, but I am not sure how to handle that verification. If i put it in the command, I need to know state implementation details, and if I put it in the state, I need to know command execution details.
@AlexandreVaillancourt I thought of that but then i realized that the only real way to validate a command would be to know the implementation details of the command
and every command has different implementation details
in a card game example, i shouldnt be able to raise to X amount if X is less than my balance or the current state of the minimum amount in the pot