Skip to content

Method: OthelloDefaultMoveFactory()

1: /*
2: * Copyright © 2020 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 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: * Othello-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: * othello-core. If not, see <http://www.gnu.org/licenses/>.
18: */
19: package de.fhdw.gaming.othello.core.moves.impl;
20:
21: import de.fhdw.gaming.othello.core.domain.OthelloPosition;
22: import de.fhdw.gaming.othello.core.moves.OthelloMove;
23: import de.fhdw.gaming.othello.core.moves.factory.OthelloMoveFactory;
24:
25: /**
26: * Implements {@link OthelloMoveFactory}.
27: */
28: public final class OthelloDefaultMoveFactory implements OthelloMoveFactory {
29:
30: @Override
31: public OthelloMove createPlaceTokenMove(final boolean placingBlackToken, final OthelloPosition tokenPosition) {
32: return new OthelloPlaceTokenMove(placingBlackToken, tokenPosition);
33: }
34:
35: @Override
36: public OthelloMove createSkipMove(final boolean placingBlackToken) {
37: return new OthelloSkipMove(placingBlackToken);
38: }
39: }