Skip to content

Package: VierConnectsMakeMoveBoardEvent

VierConnectsMakeMoveBoardEvent

nameinstructionbranchcomplexitylinemethod
VierConnectsMakeMoveBoardEvent(VierConnectsPosition)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
accept(VierConnectsBoardEventVisitor)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getFieldPosition()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * Copyright © 2021-2023 Fachhochschule für die Wirtschaft (FHDW) Hannover
3: *
4: * This file is part of ipspiel24-VierConnects-gui.
5: *
6: * ipspiel24-VierConnects-gui 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: * ipspiel24-VierConnects-gui 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: * ipspiel24-VierConnects-gui. If not, see <http://www.gnu.org/licenses/>.
18: */
19: package de.fhdw.gaming.ipspiel24.VierConnects.gui.event;
20:
21: import de.fhdw.gaming.ipspiel24.VierConnects.core.domain.VierConnectsPosition;
22:
23: /**
24: * Represents an {@link VierConnectsBoardEvent} where the user selected a field to make a move.
25: */
26: public final class VierConnectsMakeMoveBoardEvent implements VierConnectsBoardEvent {
27:
28: /**
29: * The position of the field selected.
30: */
31: private final VierConnectsPosition fieldPosition;
32:
33: /**
34: * Constructor.
35: *
36: * @param fieldPosition The position of the field selected.
37: */
38: public VierConnectsMakeMoveBoardEvent(final VierConnectsPosition fieldPosition) {
39: this.fieldPosition = fieldPosition;
40: }
41:
42: /**
43: * Returns the position of the field selected.
44: */
45: public VierConnectsPosition getFieldPosition() {
46: return this.fieldPosition;
47: }
48:
49: @Override
50: public void accept(final VierConnectsBoardEventVisitor visitor) {
51: visitor.handleMakeMove(this);
52: }
53: }