File tree 3 files changed +7
-4
lines changed
3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name := "strategygames"
2
2
3
3
organization := " org.playstrategy"
4
4
5
- version := " 10.2.1-pstrat158 "
5
+ version := " 10.2.1-pstrat159 "
6
6
7
7
scalaVersion := " 2.13.10"
8
8
Original file line number Diff line number Diff line change @@ -22,10 +22,13 @@ final case class FEN(value: String) extends AnyVal {
22
22
23
23
def komi : Double = intFromFen(7 ).getOrElse(0 ) / 10.0
24
24
25
+ // need to account for old style of fen without pass info due to studies and setup info
26
+ def oldFenSytle : Boolean = value.split(' ' ).length == 9
27
+
25
28
// Consecutive Pass count. Capped at 2, 3 is reserved for end game (after "ss:")
26
- def fenPassCount : Int = intFromFen(8 ).getOrElse(0 )
29
+ def fenPassCount : Int = if (oldFenSytle) 0 else intFromFen(8 ).getOrElse(0 )
27
30
28
- def fullMove : Option [Int ] = intFromFen(9 )
31
+ def fullMove : Option [Int ] = if (oldFenSytle) intFromFen( 8 ) else intFromFen(9 )
29
32
30
33
def ply : Option [Int ] =
31
34
fullMove map { fm =>
Original file line number Diff line number Diff line change @@ -26,10 +26,10 @@ object Forsyth {
26
26
variant = variant,
27
27
pocketData = apiPosition.pocketData,
28
28
uciMoves = fen.fenPassCount match {
29
- case 0 => List ()
30
29
case 1 => List (" pass" )
31
30
case 2 => List (" pass" , " pass" )
32
31
case 3 => List (" ss:" )
32
+ case _ => List ()
33
33
},
34
34
position = apiPosition.some
35
35
),
You can’t perform that action at this time.
0 commit comments