Skip to content

Method: applyTo(SspState, SspPlayer)

1: /*
2: * Copyright © 2021-2023 Fachhochschule für die Wirtschaft (FHDW) Hannover
3: *
4: * This file is part of ipspiel23-Ssp.
5: *
6: * Ipspiel23-Ssp is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
7: * License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
8: * version.
9: *
10: * Ipspiel23-Ssp is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
11: * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12: *
13: * You should have received a copy of the GNU General Public License along with ipspiel23-Ssp. If not, see
14: * <http://www.gnu.org/licenses/>.
15: */
16: package de.fhdw.gaming.ipspiel23.ssp.moves.impl;
17:
18: import de.fhdw.gaming.core.domain.GameException;
19: import de.fhdw.gaming.ipspiel23.ssp.domain.SspPlayer;
20: import de.fhdw.gaming.ipspiel23.ssp.domain.SspState;
21: import de.fhdw.gaming.ipspiel23.ssp.domain.impl.outcomes.SspAnswer;
22:
23: /**
24: * Says "stone".
25: */
26: public class SspStoneMove extends AbstractSspMove {
27:
28: @Override
29: public void applyTo(final SspState state, final SspPlayer player) throws GameException {
30: player.setAnswer(SspAnswer.STONE);
31: }
32:
33: @Override
34: public String toString() {
35: return "Saying stone";
36: }
37: }