Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicRobotModel ¶
type BasicRobotModel struct {
// contains filtered or unexported fields
}
BasicRobotModel 是基本的机器人模型
type FightingRobot ¶
type FightingRobot struct {
*BasicRobotModel
}
FightingRobot 实际的战斗机器人
func (FightingRobot) Work ¶
func (f FightingRobot) Work() string
Work for FightingRobot to do some fighting
type FightingRobotFactory ¶
type FightingRobotFactory struct{}
FightingRobotFactory 生产各类军工机器人
func (FightingRobotFactory) Build ¶
func (FightingRobotFactory) Build() Assistant
Build a robot from FightingRobotFactory
type HomeRobotFactory ¶
type HomeRobotFactory struct{}
HomeRobotFactory 生产各类家用机器人
func (HomeRobotFactory) Build ¶
func (HomeRobotFactory) Build() Assistant
Build a robot from HomeRobotFactory
type IRobotFactory ¶
type IRobotFactory interface {
Build() Assistant
}
IRobotFactory must be implemented by Factory different Factory create different robot
Click to show internal directories.
Click to hide internal directories.