Compare commits

...
2 Commits
Author SHA1 Message Date
cjdenio 6a83b1c263 fix 100% cpu usage 2026-09-10 11:43:37 -05:00
cjdenio 1ae13edd35 makefile + small stuff 2026-09-10 10:11:42 -05:00
4 changed files with 13 additions and 4 deletions

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
all: bin/crossword bin/crossword-ssh
bin/crossword: main.go puz/puz.go game/game.go
go build -o $@ .
bin/crossword-ssh: ssh/main.go puz/puz.go game/game.go
go build -o $@ ./ssh
+1 -2
View File
@@ -5,7 +5,6 @@ todo
- timer
- reveal grid/word
- .puz checksums
- fix shift+enter in other terminals
- fix shift+enter / short+tab in other terminals
- after entering letter, jump to next unfilled cell (even if it's backwards)
- tab/shift+tab
- clear grid
+2 -1
View File
@@ -396,6 +396,7 @@ func (state *State) HandleInput(buffer []byte) (exited bool) {
if state.GridFilled() {
if state.CheckPuzzle() {
state.SolveState = 2
return true
} else {
state.SolveState = 1
}
@@ -417,7 +418,7 @@ func (state *State) HandleInput(buffer []byte) (exited bool) {
}
}
if buffer[0] == '\r' {
if buffer[0] == '\r' || buffer[0] == '\t' {
state.NextWord()
}
if buffer[0] == '~' {
+4 -1
View File
@@ -56,7 +56,10 @@ func main() {
})
for {
scanner.Scan()
ok := scanner.Scan()
if !ok {
break
}
buffer := scanner.Bytes()
exited := state.HandleInput(buffer)