Skip to content

Package: TicTacToeMoveFactory

TicTacToeMoveFactory

Coverage

1: /*
2: * Copyright © 2021 Fachhochschule für die Wirtschaft (FHDW) Hannover
3: *
4: * This file is part of ipspiel23-tictactoe-core.
5: *
6: * ipspiel23-tictactoe-core is free software: you can redistribute it and/or modify it under
7: * the terms of the GNU General Public License as published by the Free Software
8: * Foundation, either version 3 of the License, or (at your option) any later
9: * version.
10: *
11: * ipspiel23-tictactoe-core is distributed in the hope that it will be useful, but WITHOUT
12: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14: * details.
15: *
16: * You should have received a copy of the GNU General Public License along with
17: * ipspiel23-tictactoe-core. If not, see <http://www.gnu.org/licenses/>.
18: */
19: package de.fhdw.gaming.ipspiel23.tictactoe.core.moves.factory;
20:
21: import de.fhdw.gaming.ipspiel23.tictactoe.core.domain.TicTacToePosition;
22: import de.fhdw.gaming.ipspiel23.tictactoe.core.moves.TicTacToeMove;
23:
24: /**
25: * Allows to create Tic Tac Toe moves.
26: */
27: public interface TicTacToeMoveFactory {
28:
29: /**
30: * Creates a move that places a cross or nought on the Tic Tac Toe board.
31: *
32: * @param cross {@code true} if a cross is to be made, {@code false} chooses a nought instead.
33: * @param tokenPosition The position of the field having its state changed. It must point to an empty field.
34: */
35: TicTacToeMove createPlaceMarkMove(boolean cross, TicTacToePosition tokenPosition);
36: }