memento_test.go

最后更新于:2022-04-02 04:50:12

~~~ package memento import ( "testing" ) func TestMemento(t *testing.T) { gr := GameRole{} gr.GetInitState() gr.StateDisplay() caretaker := RoleStateCaretaker{} caretaker.memento = gr.SaveState() gr.Fight() gr.StateDisplay() gr.RecoveryState(caretaker.memento) gr.StateDisplay() } ~~~
';