completed save rect to RLE file feature

This commit is contained in:
2024-05-26 20:26:13 +02:00
parent cb3e8b3c4c
commit 4b38bea5db
7 changed files with 160 additions and 5 deletions

View File

@@ -8,8 +8,9 @@ import (
// a GOL rule
type Rule struct {
Birth []int64
Death []int64
Definition string
Birth []int64
Death []int64
}
// parse one part of a GOL rule into rule slice
@@ -37,7 +38,7 @@ func ParseGameRule(rule string) *Rule {
log.Fatalf("Invalid game rule <%s>", rule)
}
golrule := &Rule{}
golrule := &Rule{Definition: rule}
for _, part := range parts {
if part[0] == 'B' {