Package Helper
Class Move
- java.lang.Object
-
- Helper.Move
-
public class Move extends java.lang.Object
Move class represents a move in the Domineering game, consisting of two positions and the player making the move.- Since:
- 2023-12-01
- Version:
- 1.0
- Author:
- Laamiri Ouail & Hajar Sadik
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte
getPlayer()
Gets the player making the move.Position
getPosition1()
Gets the first position of the move.Position
getPosotion2()
Gets the second position of the move.boolean
hasPosition(Position position)
Checks if the move has a specific position.
-
-
-
Method Detail
-
getPosition1
public Position getPosition1()
Gets the first position of the move.- Returns:
- The first position of the move.
-
getPosotion2
public Position getPosotion2()
Gets the second position of the move.- Returns:
- The second position of the move.
-
hasPosition
public boolean hasPosition(Position position)
Checks if the move has a specific position.- Parameters:
position
- The position to check.- Returns:
- True if the move has the specified position, false otherwise.
-
getPlayer
public byte getPlayer()
Gets the player making the move.- Returns:
- The player making the move (1 or 2).
-
-