Skip to content

Commit 22e104f

Browse files
committed
update tag model for sgf backgammon
1 parent 5172b6e commit 22e104f

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name := "strategygames"
22

33
organization := "org.playstrategy"
44

5-
version := "10.2.1-pstrat174"
5+
version := "10.2.1-pstrat175"
66

77
scalaVersion := "2.13.10"
88

src/main/scala/backgammon/Pos.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ case class Pos private (index: Int) extends AnyVal {
8080
def piotr: Char = Piotr.lookup.get(index).getOrElse('?')
8181
def piotrStr = piotr.toString
8282

83-
def sgf = (97 + (23 - index)).toChar.toString()
83+
def sgf = (97 + index).toChar.toString()
8484

8585
def last: Boolean = (index + 1) % File.all.size == 0
8686

src/main/scala/format/sgf/tagModel.scala

+5-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ object Tags {
4242

4343
val importantTagRoster = List(
4444
Tag.FF,
45-
Tag.CA,
4645
Tag.GM,
46+
Tag.CA,
47+
Tag.AP,
4748
Tag.DT,
4849
Tag.EV,
4950
Tag.TM,
@@ -59,6 +60,7 @@ object Tag {
5960
case object FF extends TagType // File Format
6061
case object CA extends TagType // Character
6162
case object GN extends TagType // Game Name
63+
case object AP extends TagType // Application
6264
case object DT extends TagType { // Date time
6365
val format = DateTimeFormat forPattern "yyyy.MM.dd" withZone DateTimeZone.UTC
6466
}
@@ -94,8 +96,9 @@ object Tag {
9496

9597
val tagTypes = List(
9698
FF,
97-
CA,
9899
GN,
100+
CA,
101+
AP,
99102
DT,
100103
PC,
101104
EV,

0 commit comments

Comments
 (0)