• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mlange-42 / arche-model / 4731229459

18 Apr 2023 10:20AM CUT coverage: 96.368% (+0.2%) from 96.144%
4731229459

push

github

GitHub
Single grid coords & MatrixToGrid observer (#38)

24 of 24 new or added lines in 1 file covered. (100.0%)

398 of 413 relevant lines covered (96.37%)

127.65 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/observer/row_to_table.go
1
package observer
2

3
import "github.com/mlange-42/arche/ecs"
4

5
// RowToTable is an observer that serves as adapter from a [Row] observer to a [Table] observer.
6
type RowToTable struct {
7
        Observer Row
8
        values   [1][]float64
9
}
10

11
// Initialize the child observer.
12
func (o *RowToTable) Initialize(w *ecs.World) {
1✔
13
        o.Observer.Initialize(w)
1✔
14
}
1✔
15

16
// Update the child observer.
17
func (o *RowToTable) Update(w *ecs.World) {
1✔
18
        o.Observer.Update(w)
1✔
19
}
1✔
20

21
// Header / column names of the child observer in the same order as data values.
22
func (o *RowToTable) Header() []string {
1✔
23
        return o.Observer.Header()
1✔
24
}
1✔
25

26
// Values for the current model tick in table format.
27
func (o *RowToTable) Values(w *ecs.World) [][]float64 {
2✔
28
        o.values[0] = o.Observer.Values(w)
2✔
29
        return o.values[:]
2✔
30
}
2✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc