File tree 2 files changed +16
-2
lines changed
2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -315,7 +315,7 @@ const testPgnCrazyhouse = `[Event "Casual Crazyhouse game"]
315
315
1. d4 d5 2. Nf3 { D02 Queen's Pawn Game: Zukertort Variation } Bf5 3. e3 e6 4. Bd3 Bxd3 5. Qxd3 Nf6 6. B@g5 B@a6 7. Qd2 Ne4 8. Bxd8 Nxd2 9. Kxd2 Bb4+ 10. Nc3 Q@e2# { Black wins by checkmate. } 0-1`
316
316
317
317
//console.log("test", parsePgnFull(testPgnRacingKings))
318
- console . log ( "test" , parsePgnFull ( testPgnCrazyhouse ) )
318
+ // console.log("test", parsePgnFull(testPgnCrazyhouse))
319
319
320
320
if ( typeof module != "undefined" ) {
321
321
module . exports = {
Original file line number Diff line number Diff line change @@ -129,7 +129,21 @@ object ChessApp {
129
129
}
130
130
}
131
131
case None => {
132
- errors :+= (" ill formatted uci " + uci)
132
+ format.Uci (uci) match {
133
+ case Some (drop) => {
134
+ g(drop) match {
135
+ case cats.data.Validated .Valid ((ng, _)) => {
136
+ g = ng
137
+ }
138
+ case cats.data.Validated .Invalid (why) => {
139
+ errors :+= (uci + " invalid drop " + why)
140
+ }
141
+ }
142
+ }
143
+ case None => {
144
+ errors :+= (" ill formatted uci " + uci)
145
+ }
146
+ }
133
147
}
134
148
}
135
149
})
You can’t perform that action at this time.
0 commit comments