chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed51fe5
)
at-otter hidde: Use api_piece_move_synch in one place
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 13 Mar 2021 20:51:39 +0000
(20:51 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 14 Mar 2021 00:17:55 +0000
(
00:17
+0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
apitest/at-otter.rs
patch
|
blob
|
history
diff --git
a/apitest/at-otter.rs
b/apitest/at-otter.rs
index ec4f467e7b34aa428f199650329c6e34c7e8812e..17dfa16a25020c6f2920d66e033d97522a4f9726 100644
(file)
--- a/
apitest/at-otter.rs
+++ b/
apitest/at-otter.rs
@@
-505,9
+505,8
@@
impl Ctx {
bob.synch()?;
for (&pawn, &xoffset) in izip!(&a_pawns, [10,20].iter()) {
- alice.api_with_piece_op(&a_pieces[pawn].id, "m", json![
- (a_pieces[hand].pos + PosC([xoffset, 0]))?.0
- ])?;
+ let pos = (a_pieces[hand].pos + PosC([xoffset, 0]))?;
+ alice.api_piece_move_synch(&mut a_pieces, pawn, pos)?;
}
alice.synchu(&mut a_pieces)?;