skeleton: Added play classes

This commit is contained in:
2023-03-15 13:51:30 +11:00
parent 0363e54ddf
commit f274129495
2 changed files with 13 additions and 10 deletions

View File

@@ -88,10 +88,10 @@ Score
## Setup board ## Setup board
## Create player (requires input data, probably from player number and colour) ## Create player (requires input data, probably from player number and colour)
## Exploration Phase ## Phase play
## Check Placement (requires input data, probably piece annd returns bool) ## Check Placement (requires input data, probably piece annd returns bool)
## Place Piece (requires input data, probably from player and piece type) ## Place Piece (requires input data, probably from player and piece type)
## Exploration Phase over (bool) ## Phase over (bool)
# Objects # Objects

View File

@@ -1,20 +1,23 @@
package comp1110.ass2.skeleton; package comp1110.ass2.skeleton;
public class exploration { public class play {
enum gameMode {
exploration, settlement
}
/** /**
* This method is used to check if the placement of the tile is valid * This method is used to check if the placement of the tile is valid
* It checks if the tile is placed on water or land and if the tile is placed on a tile that is already occupied. * It checks if the tile is placed on water or land and if the tile is placed on a tile that is already occupied.
* It also checks if the tile is placed on a tile that is not adjacent to the tile that is already placed. * * It also checks if the tile is placed on a tile that is not adjacent to the tile that is already placed.
*
* Has input game mode
*/ */
public boolean validPlacement() { public boolean validPlacement(gameMode mode) {
return false; // Needed to stop errors return false; // Needed to stop errors
} }
/** /**
* This method picks the youngest player and gives them the first turn. * This method picks the player and gives them the first turn.
* It then asks them to place a tile. * It then asks them to place a tile.
* It then asks the next player to place a tile. * It then asks the next player to place a tile.
*/ */
@@ -22,7 +25,7 @@ public class exploration {
} }
/** /**
* This method will be used to get the player to place a tile. * This method will be used to get the player to place a tile.
* It will use the validPlacement method to check if the placement is valid. * It will use the validPlacement method to check if the placement is valid.
* It will also use the placeTile method to place the tile. * It will also use the placeTile method to place the tile.
@@ -50,7 +53,7 @@ public class exploration {
/** /**
* This method will be used to check if exploration phase is over. * This method will be used to check if exploration phase is over.
*/ */
public boolean explorationPhaseOver() { public boolean phaseOver() {
return false; // Needed to stop errors return false; // Needed to stop errors
} }
} }