mirror of
https://github.com/lichess-org/scalachess.git
synced 2026-05-26 13:50:54 +00:00
unlazy vals
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2012-2012 Thibault Duplessis
|
||||
Copyright (c) 2012-2014 Thibault Duplessis
|
||||
|
||||
The MIT license
|
||||
|
||||
|
||||
@@ -39,11 +39,11 @@ sealed case class Pos private (x: Int, y: Int, piotr: Char) {
|
||||
def xDist(other: Pos) = abs(x - other.x)
|
||||
def yDist(other: Pos) = abs(y - other.y)
|
||||
|
||||
lazy val file = Pos xToString x
|
||||
lazy val rank = y.toString
|
||||
lazy val key = file + rank
|
||||
lazy val color = Color((x % 2 == 0) ^ (y % 2 == 0))
|
||||
lazy val piotrStr = piotr.toString
|
||||
val file = Pos xToString x
|
||||
val rank = y.toString
|
||||
val key = file + rank
|
||||
val color = Color((x % 2 == 0) ^ (y % 2 == 0))
|
||||
val piotrStr = piotr.toString
|
||||
|
||||
override val toString = key
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user