Skip to content

Commit 580e1e7

Browse files
authored
Merge branch 'dev' into 464-support-studies
2 parents 968af28 + 87cc76a commit 580e1e7

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

src/main/scala/ipc/ClientOut.scala

+31-3
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,25 @@ object ClientOut {
317317
blur = d int "b" contains 1
318318
ackId = d int "a"
319319
} yield RoundMove(variant.gameFamily, drop, blur, parseMetrics(d), ackId)
320+
case "lift" =>
321+
for {
322+
d <- o obj "d"
323+
lib = dataGameLogic(d)
324+
variant = dataVariant(d, lib)
325+
pos <- d str "pos"
326+
lift <- Uci.Lift.fromStrings(lib, variant.gameFamily, pos)
327+
blur = d int "b" contains 1
328+
ackId = d int "a"
329+
} yield RoundMove(variant.gameFamily, lift, blur, parseMetrics(d), ackId)
330+
case "endturn" =>
331+
for {
332+
d <- o obj "d"
333+
lib = dataGameLogic(d)
334+
variant = dataVariant(d, lib)
335+
endTurn <- Uci.EndTurn.apply(lib, variant.gameFamily)
336+
blur = d int "b" contains 1
337+
ackId = d int "a"
338+
} yield RoundMove(variant.gameFamily, endTurn, blur, parseMetrics(d), ackId)
320339
case "pass" =>
321340
for {
322341
d <- o obj "d"
@@ -326,6 +345,15 @@ object ClientOut {
326345
blur = d int "b" contains 1
327346
ackId = d int "a"
328347
} yield RoundMove(variant.gameFamily, pass, blur, parseMetrics(d), ackId)
348+
case "diceroll" =>
349+
for {
350+
d <- o obj "d"
351+
lib = dataGameLogic(d)
352+
variant = dataVariant(d, lib)
353+
diceroll <- Uci.DoRoll.apply(lib)
354+
blur = d int "b" contains 1
355+
ackId = d int "a"
356+
} yield RoundMove(variant.gameFamily, diceroll, blur, parseMetrics(d), ackId)
329357
case "selectSquares" =>
330358
for {
331359
d <- o obj "d"
@@ -347,9 +375,9 @@ object ClientOut {
347375
case "flag" => o str "d" flatMap PlayerIndex.fromName map RoundFlag.apply
348376
case "bye2" => Some(RoundBye)
349377
case "palantirPing" => Some(PalantirPing)
350-
case "moretime" | "rematch-yes" | "rematch-no" | "takeback-yes" | "takeback-no" | "draw-yes" |
351-
"draw-no" | "draw-claim" | "resign" | "resign-force" | "draw-force" | "abort" | "outoftime" |
352-
"select-squares-accept" | "select-squares-decline" =>
378+
case "moretime" | "rematch-yes" | "rematch-no" | "takeback-yes" | "takeback-no" | "undo" |
379+
"draw-yes" | "draw-no" | "draw-claim" | "resign" | "resign-force" | "draw-force" | "abort" |
380+
"outoftime" | "select-squares-accept" | "select-squares-decline" =>
353381
Some(RoundPlayerForward(o))
354382
case "select-squares-offer" =>
355383
for {

0 commit comments

Comments
 (0)