-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Description
func (bl BoxList) BiggestsColor() Color {
v := 0.00
k := Color(WHITE)
for _, b := range bl {
if b.Volume() > v {
v = b.Volume()
k = b.color
}
}
return k
}
fmt.Println("The biggest one is", boxes.BiggestsColor().String())
fmt.Println("Obviously, now, the biggest one is", boxes.BiggestsColor().String())
BiggestsColor()定在在BoxList上面,返回list里面容量最大的颜色
——————
以上四个的BiggestsColor()应该为BiggestColor() ?因理解差异,或许原本就是对的.
Metadata
Metadata
Assignees
Labels
No labels