mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-05-22 23:36:46 +08:00
Update TODO_StateMachine.md
This commit is contained in:
@@ -139,7 +139,6 @@ class Calculator
|
||||
func Main(): string
|
||||
{
|
||||
var calculator = new Calculator^();
|
||||
calculator.RunStateMachine();
|
||||
calculator.Digit(1);
|
||||
calculator.Digit(2);
|
||||
calculator.Add();
|
||||
@@ -375,12 +374,8 @@ class Calculator
|
||||
};
|
||||
}
|
||||
|
||||
func RunStateMachine(): void
|
||||
new()
|
||||
{
|
||||
if (<state>coroutine is not null)
|
||||
{
|
||||
raise "RunStateMachine() cannot be called while the state machine is running.";
|
||||
}
|
||||
<state>CreateCoroutine(:Calculator::<state>State::<state>Start);
|
||||
<state>Resume();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user