mirror of
https://codeberg.org/scip/golsky.git
synced 2025-12-18 04:51:05 +01:00
completed save rect to RLE file feature
This commit is contained in:
5
grid.go
5
grid.go
@@ -69,6 +69,11 @@ func GetFilename(generations int64) string {
|
||||
return fmt.Sprintf("dump-%s-%d.gol", now.Format("20060102150405"), generations)
|
||||
}
|
||||
|
||||
func GetFilenameRLE(generations int64) string {
|
||||
now := time.Now()
|
||||
return fmt.Sprintf("rect-%s-%d.rle", now.Format("20060102150405"), generations)
|
||||
}
|
||||
|
||||
func (grid *Grid) SaveState(filename string) error {
|
||||
file, err := os.Create(filename)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user