-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstruct.go
More file actions
58 lines (46 loc) · 717 Bytes
/
struct.go
File metadata and controls
58 lines (46 loc) · 717 Bytes
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
package main
type position struct {
x int
y int
}
type size position
func (p *size) maxSize() int {
return p.x*p.y - 1
}
type floatPosition struct {
x float64
y float64
}
func (in *floatPosition) toIntPos() position {
var out position
out.x = int(in.x)
out.y = int(in.y)
return out
}
type vect floatPosition
type ray struct {
pos position
dist float32
angle float64
vecDir vect
}
type wolfMap struct {
size size
array []byte
}
type personnage struct {
angle float64
pos floatPosition
}
type miniMap struct {
posStart position
pix *PixelArray
zoom float32
}
type data struct {
pix *PixelArray
miniMap miniMap
theMap wolfMap
player personnage
refresh bool
}