Skip to content

Commit f21e09f

Browse files
author
Daniel Barclay
committed
ColoredLines: Cleaned a manual apply() call to copy().
1 parent bddf203 commit f21e09f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/scala/com/us/dsb/explore/algs/coloredlines/manual/game/UpperGameState.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ private[manual] case class UpperGameState(boardPlus: BoardPlus,
102102

103103
val nextState =
104104
if (! postMoveState.boardPlus.isFull) {
105-
//?????? use .copy
106-
UpperGameState(postMoveState.boardPlus, postMoveState.selectionAddress, gameResult).asRight
105+
copy(boardPlus = postMoveState.boardPlus, selectionAddress = postMoveState.selectionAddress).asRight
107106
}
108107
else {
109108
UpperGameState(postMoveState.boardPlus,

0 commit comments

Comments
 (0)