Initial commit

implemented the game of life variation with hexagonal grid
This commit is contained in:
2025-12-16 11:33:00 +00:00
commit ea5b5c4e75
17 changed files with 1229 additions and 0 deletions

37
math/comp.go Normal file
View File

@@ -0,0 +1,37 @@
package math
func Max[T SignedNumber](nLst ...T) T {
switch len(nLst) {
case 0:
var zeroT T
return zeroT
case 1:
return nLst[0]
default:
m := nLst[0]
for _, n := range nLst[1:] {
if m < n {
m = n
}
}
return m
}
}
func Min[T SignedNumber](nLst ...T) T {
switch len(nLst) {
case 0:
var zeroT T
return zeroT
case 1:
return nLst[0]
default:
m := nLst[0]
for _, n := range nLst[1:] {
if m > n {
m = n
}
}
return m
}
}