File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
src/main/scala/com/us/dsb/explore/algs/coloredlines/manual/game Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ object GameLogicSupport {
1212
1313 // (was "private[this]" before test calls:)
1414 private [game] def pickRandomBallKind ()(implicit rng : Random ): BallKind =
15- BallKind .values(rng.nextInt(2 /* ???BallKind.values.size*/ ))
15+ BallKind .values(rng.nextInt(3 /* ???BallKind.values.size*/ ))
1616
1717 // (was "private[this]" before test calls:)
1818 @ tailrec
@@ -233,13 +233,13 @@ object GameLogicSupport {
233233 val moveBallColor = boardPlus.getBallStateAt(from).get // ????
234234 val postMoveBoard = boardPlus.withNoBallAt(from).withBallAt(to, moveBallColor)
235235
236- val postHandlingResult =
237- LineDetector .handleBallArrival(postMoveBoard, to)
238- .copy(clearSelection = true )
239- if ( ! postHandlingResult.anyRemovals )
240- placeNextBalls(postHandlingResult.boardPlus)
241- else
242- postHandlingResult
236+ val postReapingResult = LineDetector .handleBallArrival(postMoveBoard, to)
237+ val postPostReadingResult =
238+ if ( ! postReapingResult.anyRemovals )
239+ placeNextBalls(postReapingResult.boardPlus )
240+ else
241+ postReapingResult
242+ postPostReadingResult.copy(clearSelection = true )
243243 }
244244 }
245245
You can’t perform that action at this time.
0 commit comments