22 lines
765 B
Java
22 lines
765 B
Java
package ru.fokinatorr.chess.game;
|
|
|
|
import reactor.core.publisher.Mono;
|
|
import ru.fokinatorr.chess.server.game.event.GameJoinedEvent;
|
|
|
|
/// Additional methods for a local (offline) chess game.
|
|
public interface LocalChessGameService extends ChessGameService {
|
|
|
|
/// Undo a move. The resulting `Publisher` will signal when the event submission completes.
|
|
Mono<Void> undoMove();
|
|
|
|
/// Redo a move. The resulting `Publisher` will signal when the event submission completes.
|
|
Mono<Void> redoMove();
|
|
|
|
/// Returns a `Publisher` that completes without a value since local games can't have an opponent joining.
|
|
/// @return an empty `Publisher`
|
|
@Override
|
|
default Mono<GameJoinedEvent> waitForOpponentToJoin() {
|
|
return Mono.empty();
|
|
}
|
|
}
|