Skip to content

Method: toString()

1: package de.fhdw.gaming.ipspiel23.ht.moves.impl;
2:
3: import de.fhdw.gaming.core.domain.GameException;
4: import de.fhdw.gaming.ipspiel23.ht.domain.Answer;
5: import de.fhdw.gaming.ipspiel23.ht.domain.IHTPlayer;
6: import de.fhdw.gaming.ipspiel23.ht.domain.IHTState;
7: import de.fhdw.gaming.ipspiel23.ht.moves.HTBaseMove;
8:
9: /**
10: * Represents a "HEADS" move in a game of Heads or Tails.
11: */
12: public class HTHeadsMove extends HTBaseMove {
13:
14: @Override
15: public void applyTo(final IHTState state, final IHTPlayer player) throws GameException {
16: player.setAnswer(Answer.HEADS);
17: }
18:
19: @Override
20: public String toString() {
21: return "Playing heads";
22: }
23: }