actualCombat

package
v0.0.0-...-db5681a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Caretaker

type Caretaker struct {
	MementoArray []*Memento
}

负责人类

func (*Caretaker) AddMemento

func (c *Caretaker) AddMemento(m *Memento)

添加备忘录

func (*Caretaker) GetMemento

func (c *Caretaker) GetMemento(index int) *Memento

获取备忘录

type Memento

type Memento struct {
	State string
}

备忘录类状态

func (*Memento) GetSavedState

func (m *Memento) GetSavedState() string

获取设置好的状态

type Originator

type Originator struct {
	State string
}

原发器类

func (*Originator) CreateMemento

func (e *Originator) CreateMemento() *Memento

创建备忘录

func (*Originator) GetState

func (e *Originator) GetState() string

获取状态

func (*Originator) RestoreMemento

func (e *Originator) RestoreMemento(m *Memento)

恢复原发器对象的状态

func (*Originator) SetState

func (e *Originator) SetState(State string)

设置状态

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL