refactored and added game save function (key: s)

This commit is contained in:
2024-05-23 14:27:42 +02:00
parent 3f0b4df8ff
commit 1001210d54
7 changed files with 639 additions and 494 deletions

12
generics.go Normal file
View File

@@ -0,0 +1,12 @@
package main
// find an item in a list, generic variant
func Contains[E comparable](s []E, v E) bool {
for _, vs := range s {
if v == vs {
return true
}
}
return false
}