Large refactor to properly implement radar
/radar now returns a set of non-empty tile blips
This commit is contained in:
parent
fc54775df9
commit
43648926ca
11 changed files with 182 additions and 50 deletions
pkg/game
|
@ -27,6 +27,22 @@ func Pmod(x, d int) int {
|
|||
}
|
||||
}
|
||||
|
||||
// Max returns the highest int
|
||||
func Max(x int, y int) int {
|
||||
if x < y {
|
||||
return y
|
||||
}
|
||||
return x
|
||||
}
|
||||
|
||||
// Min returns the lowest int
|
||||
func Min(x int, y int) int {
|
||||
if x > y {
|
||||
return y
|
||||
}
|
||||
return x
|
||||
}
|
||||
|
||||
// Vector desribes a 3D vector
|
||||
type Vector struct {
|
||||
X int `json:"x"`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue