MCPcopy Create free account
hub / github.com/SolarLune/masterplan / CompletionLevel

Method CompletionLevel

contents.go:399–415  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

397}
398
399func (cc *CheckboxContents) CompletionLevel() float32 {
400
401 if dep := cc.DependentCards(); len(dep) > 0 {
402 comp := float32(0)
403 for _, c := range dep {
404 comp += c.CompletionLevel()
405 }
406 return comp
407 }
408
409 if cc.Card.Properties.Get("checked").AsBool() {
410 return 1
411 }
412
413 return 0
414
415}
416
417func (cc *CheckboxContents) MaximumCompletionLevel() float32 {
418

Callers

nothing calls this directly

Calls 4

DependentCardsMethod · 0.95
AsBoolMethod · 0.80
CompletionLevelMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected