mirror of
https://github.com/cjdenio/crossword.git
synced 2026-10-03 11:06:19 +00:00
Compare commits
2
Commits
a87433ce9e
...
6a83b1c263
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a83b1c263 | ||
|
|
1ae13edd35 |
No files matched your search
@@ -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
|
||||||
@@ -5,7 +5,6 @@ todo
|
|||||||
- timer
|
- timer
|
||||||
- reveal grid/word
|
- reveal grid/word
|
||||||
- .puz checksums
|
- .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)
|
- after entering letter, jump to next unfilled cell (even if it's backwards)
|
||||||
- tab/shift+tab
|
|
||||||
- clear grid
|
- clear grid
|
||||||
+2
-1
@@ -396,6 +396,7 @@ func (state *State) HandleInput(buffer []byte) (exited bool) {
|
|||||||
if state.GridFilled() {
|
if state.GridFilled() {
|
||||||
if state.CheckPuzzle() {
|
if state.CheckPuzzle() {
|
||||||
state.SolveState = 2
|
state.SolveState = 2
|
||||||
|
return true
|
||||||
} else {
|
} else {
|
||||||
state.SolveState = 1
|
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()
|
state.NextWord()
|
||||||
}
|
}
|
||||||
if buffer[0] == '~' {
|
if buffer[0] == '~' {
|
||||||
|
|||||||
+4
-1
@@ -56,7 +56,10 @@ func main() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
for {
|
for {
|
||||||
scanner.Scan()
|
ok := scanner.Scan()
|
||||||
|
if !ok {
|
||||||
|
break
|
||||||
|
}
|
||||||
buffer := scanner.Bytes()
|
buffer := scanner.Bytes()
|
||||||
|
|
||||||
exited := state.HandleInput(buffer)
|
exited := state.HandleInput(buffer)
|
||||||
|
|||||||
Reference in new issue
Block a user