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

Method CompletionLevel

contents.go:4549–4568  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4547}
4548
4549func (td *TableData) CompletionLevel() float32 {
4550
4551 if td.ValueDisplayMode != ValueDisplayModeCheck {
4552 return 0
4553 }
4554
4555 completion := float32(0)
4556
4557 for y := 0; y < td.Height; y++ {
4558 for x := 0; x < td.Width; x++ {
4559 if td.Data[y][x].Value == 1 {
4560 completion++
4561 }
4562 }
4563
4564 }
4565
4566 return completion
4567
4568}
4569
4570func (td *TableData) MaximumCompletionLevel() float32 {
4571

Callers 3

CompletionLevelMethod · 0.45
UpdateMethod · 0.45
CompletionLevelMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected