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:
52db570
)
at-otter hidden: Update when we move (specific, must generalise)
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 13 Mar 2021 20:35:53 +0000
(20:35 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 13 Mar 2021 20:36:41 +0000
(20:36 +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 069ffeda74e0d4f41bc8dedfa280082a43d0ce55..12fbf507ffdf7311cee5bbe110228c53f1d3eab1 100644
(file)
--- a/
apitest/at-otter.rs
+++ b/
apitest/at-otter.rs
@@
-512,9
+512,10
@@
impl Ctx {
}
for (xi, &p) in a_pawns.iter().enumerate().take(1) {
- alice.api_with_piece_op_synch(&mut a_pieces, p, "m", json![
- [ (xi+1) * 15, 20 ]
- ])?;
+ let xix: Coord = xi.try_into().unwrap();
+ let pos = PosC([ (xix + 1) * 15, 20 ]);
+ a_pieces[p].pos = pos;
+ alice.api_with_piece_op_synch(&mut a_pieces, p, "m", json![pos.0])?;
}
alice.synchu(&mut a_pieces)?;