Created
July 20, 2017 06:42
-
-
Save anonymous/4198b24837421df3b7916c86c330699a to your computer and use it in GitHub Desktop.
the description for this gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Rook { | |
@volatile private var xPos: Long = 0l | |
@volatile private var yPos: Long = 0l | |
def updatePosition(offset: (Long, Long)): Unit = { | |
xPos += offset._1 | |
yPos += offset._2 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment