Skip to content

Commit bfe1d02

Browse files
chore: clean up Pos Uci Variant
1 parent 2277cf1 commit bfe1d02

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

src/main/scala/abalone/Pos.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ case class Pos private (index: Int) extends AnyVal {
237237
def piotrStr = piotr.toString
238238

239239
def key = file.toString + rank.toString
240-
def officialNotationKey = File(rank.index).getOrElse("").toString + "" + Rank(file.index).getOrElse("").toString
240+
def officialNotationKey = s"${File(rank.index).getOrElse("")}${Rank(file.index).getOrElse("")}"
241241
override def toString = officialNotationKey
242242
}
243243

src/main/scala/abalone/format/Uci.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ object Uci {
2424
promotion: Option[PromotableRole] = None
2525
) extends Uci {
2626

27-
def keys = orig.officialNotationKey + dest.officialNotationKey
27+
def keys = orig.key + dest.key
2828
def uci = keys + promotionString
2929

3030
def keysPiotr = orig.piotrStr + dest.piotrStr

src/main/scala/abalone/variant/Variant.scala

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import strategygames.{ GameFamily, Player }
88
import strategygames.abalone._
99
import strategygames.abalone.format.FEN
1010

11-
case class AbaloneName(val name: String)
12-
1311
// Correctness depends on singletons for each variant ID
1412
abstract class Variant private[variant] (
1513
val id: Int,

0 commit comments

Comments
 (0)