unlazy vals

This commit is contained in:
Thibault Duplessis
2014-02-10 19:58:09 +01:00
parent f79eee6590
commit 44a4fedb6f
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (c) 2012-2012 Thibault Duplessis
Copyright (c) 2012-2014 Thibault Duplessis
The MIT license
+5 -5
View File
@@ -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
}