actualCombat

package
v0.0.0-...-8d22ec3 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 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 BaseParts

type BaseParts struct {
}

基础零件

func (*BaseParts) GetPrice

func (p *BaseParts) GetPrice() float32

获取基础零件手机价格

type Decorator

type Decorator struct {
	Phone Phone
}

装饰

func (*Decorator) GetPrice

func (d *Decorator) GetPrice()

装饰方法

func (*Decorator) SetComponent

func (d *Decorator) SetComponent(c Phone)

装饰设置组件方法

type IPhone

type IPhone struct {
	Decorator
}

func (*IPhone) GetPrice

func (c *IPhone) GetPrice() float32

获取IPhone价格

type Phone

type Phone interface {
	GetPrice() float32
}

type Xiaomi

type Xiaomi struct {
	Decorator
}

func (*Xiaomi) GetPrice

func (c *Xiaomi) GetPrice() float32

小米手机的价格

Jump to

Keyboard shortcuts

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