Skip to content

Commit 1c97fd8

Browse files
author
Daniel Barclay
committed
ColoredLines: Purge some redundant "this.".
1 parent f21e09f commit 1c97fd8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,30 +73,29 @@ private[manual] case class UpperGameState(boardPlus: BoardPlus,
7373
tapAction match {
7474
case SelectBall |
7575
SelectEmpty =>
76-
this.withCellSelected(tapAddress)
76+
withCellSelected(tapAddress)
7777
case Deselect =>
78-
this.withNoSelection
78+
withNoSelection
7979
case TryMoveBall =>
8080
//???? should TryMoveBall carry coordinates?:
8181
//???? need to split logical moves/plays (e.g., move ball from source
8282
// to target from top-/selection-level ~UI (keep that separate from cursor-to-taps UI))
8383
val fromAddress =
84-
this.getSelectionCoordinates.getOrElse(sys.error("Shouldn't be able to happen"))
84+
getSelectionCoordinates.getOrElse(sys.error("Shouldn't be able to happen"))
8585

8686
val tryMoveResult =
8787
GameLogicSupport.doTryMoveBall(boardPlus, fromAddress, tapAddress)
8888

8989
//?????? clean:
9090
val xxx =
9191
if (tryMoveResult.clearSelection)
92-
this.withNoSelection
92+
withNoSelection
9393
else
9494
this
9595
xxx.copy(boardPlus = tryMoveResult.boardPlus)
9696
case Pass =>
9797
val passResult = GameLogicSupport.doPass(boardPlus)
98-
//?????? clean the several "this."
99-
this.copy(boardPlus = passResult.boardPlus)
98+
copy(boardPlus = passResult.boardPlus)
10099
.withNoSelection
101100
}
102101

0 commit comments

Comments
 (0)