Skip to content

Package: SspAnswer

SspAnswer

nameinstructionbranchcomplexitylinemethod
static {...}
M: 0 C: 21
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
toString()
M: 2 C: 11
85%
M: 1 C: 3
75%
M: 1 C: 3
75%
M: 1 C: 4
80%
M: 0 C: 1
100%

Coverage

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.domain.impl.outcomes;
17:
18:
19: /** Represents possible answers in a Ssp Game.
20: *
21: * @author DW
22: *
23: */
24: public enum SspAnswer {
25:
26: /**
27: * The possible answers.
28: */
29: PAPER, STONE, SCISSORS;
30:
31: @Override
32: public String toString() {
33:• switch (this) {
34: case STONE:
35: return "stone";
36: case PAPER:
37: return "paper";
38: case SCISSORS:
39: return "scissors";
40: default: return "no matching string for given answer found";
41: }
42: }
43: }