File tree 3 files changed +23
-7
lines changed
3 files changed +23
-7
lines changed Original file line number Diff line number Diff line change
1
+ name : Update Dependency Graph
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ push :
6
+ branches :
7
+ - dev # default branch of project
8
+
9
+ jobs :
10
+ update-graph :
11
+ name : Update Dependency Graph
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - uses : actions/checkout@v4
15
+ - uses : scalacenter/sbt-dependency-submission@v3
16
+ with :
17
+ working-directory : ' ./'
Original file line number Diff line number Diff line change @@ -669,7 +669,7 @@ case class ByoyomiClock(
669
669
else {
670
670
val player = players(c)
671
671
val timeUsed = timestampFor(c).fold(Centis (0 ))(t =>
672
- if (withGrace) (toNow(t) - (players(c) .lag.quota atMost Centis (200 ))) nonNeg
672
+ if (withGrace) (toNow(t) - (player .lag.quota atMost Centis (200 ))) nonNeg
673
673
else toNow(t)
674
674
)
675
675
val timeRemaining = player.remaining + player.periodsLeft * player.byoyomi
@@ -770,7 +770,8 @@ case class ByoyomiClock(
770
770
if (usingByoyomi)
771
771
updatePlayer(player) {
772
772
_.setRemaining(
773
- (remaining - moveTime) atLeast (if (switchClock) competitor.byoyomi
773
+ (remaining - moveTime) atLeast (if (! clockActive) Centis (0 )
774
+ else if (switchClock) competitor.byoyomi
774
775
else timeRemainingAfterMove)
775
776
)
776
777
.spendPeriods(periodSpan)
Original file line number Diff line number Diff line change @@ -3,8 +3,6 @@ package strategygames.samurai
3
3
import com .joansala .game .oware .OwareGame
4
4
import com .joansala .game .oware .OwareBoard
5
5
6
- import cats .implicits ._
7
-
8
6
import strategygames .Player
9
7
import strategygames .samurai .format .FEN
10
8
import strategygames .samurai .variant .Variant
@@ -177,9 +175,9 @@ object Api {
177
175
lazy val gameOutcome : Int = position.outcome()
178
176
lazy val isRepetition : Boolean = position.isRepetition() && ! allSeedsOnSameSide
179
177
180
- lazy val allSeedsOnSameSide : Boolean = toPosition
181
- .take(variant.boardSize.width)
182
- .sum === 0 || toPosition.drop(variant.boardSize.width).take(variant.boardSize.width).sum === 0 ;
178
+ lazy val allSeedsOnSameSide : Boolean =
179
+ toPosition .take(variant.boardSize.width).sum == 0 ||
180
+ toPosition.drop(variant.boardSize.width).take(variant.boardSize.width).sum == 0
183
181
184
182
val legalMoves : Array [Int ] = {
185
183
position.resetCursor()
You can’t perform that action at this time.
0 commit comments