-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.go
59 lines (51 loc) · 996 Bytes
/
ui.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package ui
import (
"time"
"github.com/kssilveira/idle-game-engine/data"
)
type Data struct {
LastInput data.ParsedInput
Error error
Resources []Resource
Actions []Action
CustomActions []CustomAction
ShowAll bool
HideOverCap bool
HideCustom bool
HideAction map[string]bool
HideResource map[string]bool
}
type Resource struct {
Resource data.Resource
Rate float64
DurationToCap time.Duration
DurationToEmpty time.Duration
}
type Action struct {
Name string
Type string
Count float64
MissingResource bool
IsLocked bool
IsHidden bool
IsOverCap bool
Costs []Cost
Adds []Add
}
type Cost struct {
Name string
Count float64
Cap float64
Cost float64
IsOverCap bool
Duration time.Duration
Costs []Cost
}
type Add struct {
Name string
Count float64
Cap float64
}
type CustomAction struct {
Name string
}