Skip to content

Package: OthelloMoveFactory

OthelloMoveFactory

Coverage

1: /*
2: * Copyright © 2020-2023 Fachhochschule für die Wirtschaft (FHDW) Hannover
3: *
4: * This file is part of othello-core.
5: *
6: * Othello-core is free software: you can redistribute it and/or modify
7: * it under the terms of the GNU General Public License as published by
8: * the Free Software Foundation, either version 3 of the License, or
9: * (at your option) any later version.
10: *
11: * Othello-core is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with othello-core. If not, see <http://www.gnu.org/licenses/>.
18: */
19: package de.fhdw.gaming.othello.core.moves.factory;
20:
21: import de.fhdw.gaming.othello.core.domain.OthelloPosition;
22: import de.fhdw.gaming.othello.core.moves.OthelloMove;
23:
24: /**
25: * Allows to create Othello moves.
26: */
27: public interface OthelloMoveFactory {
28:
29: /**
30: * Creates a move that places a token on the board.
31: *
32: * @param placingBlackToken {@code true} if a black token is placed, and {@code false} if a white token is placed.
33: * @param tokenPosition The position of the token placed on the board.
34: */
35: OthelloMove createPlaceTokenMove(boolean placingBlackToken, OthelloPosition tokenPosition);
36:
37: /**
38: * Creates a "move" that skips the current move.
39: *
40: * @param placingBlackToken {@code true} if a black token should be placed, and {@code false} if a white token
41: * should be placed.
42: */
43: OthelloMove createSkipMove(boolean placingBlackToken);
44: }