History loading

This commit is contained in:
Madison Rye Progress
2025-09-14 20:50:00 -07:00
parent 6198c794d5
commit 6b5674308e
4 changed files with 81 additions and 44 deletions

View File

@ -1,7 +1,6 @@
package state
import (
"regexp"
"testing"
. "github.com/smartystreets/goconvey/convey"
@ -49,24 +48,6 @@ func TestState(t *testing.T) {
})
})
Convey("You can maintain a history of all actions", func() {
s.Flag()
s.Mark()
s.Clear()
s.CursorSectionRight()
s.CursorSectionLeft()
s.CursorSectionDown()
s.CursorSectionUp()
s.CursorCellRight()
s.CursorCellLeft()
s.CursorCellDown()
s.CursorCellUp()
matches, err := regexp.Match(`g2,2(i\d,\d[xo]{4}){4}fmcRLDUrldu`, []byte(s.History()))
So(matches, ShouldBeTrue)
So(err, ShouldBeNil)
})
Convey("You can complete sections and clear portions of the board", func() {
s.cells.vivify(Point{0, 0})
s.cells.vivify(Point{2, 0})