forked from External/mage
improved replays - can now skip forward 10 moves or let the client play through the moves
This commit is contained in:
parent
6d4c3aa8d9
commit
f5c3494723
12 changed files with 142 additions and 20 deletions
|
|
@ -68,7 +68,14 @@ public class ReplaySession implements GameCallback {
|
|||
updateGame(replay.next(), replay.getGame());
|
||||
}
|
||||
|
||||
public synchronized void previous() {
|
||||
public synchronized void next(int moves) {
|
||||
for (int i = 0; i < moves; i++) {
|
||||
replay.next();
|
||||
}
|
||||
updateGame(replay.next(), replay.getGame());
|
||||
}
|
||||
|
||||
public synchronized void previous() {
|
||||
updateGame(replay.previous(), replay.getGame());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue