Package dev.davwheat

Class GameBoard


  • public class GameBoard
    extends java.lang.Object
    Class that handles storing and managing the data relating to the board, including the spaces on the board.
    • Constructor Summary

      Constructors 
      Constructor Description
      GameBoard​(Game gameInstance)
      Create a new instance of GameBoard.
    • Method Summary

      Modifier and Type Method Description
      BoardSpace getBoardSpaceAtPosition​(int index)  
      java.util.List<Animal> getOwnedAnimals​(Player actor)
      Fetches all the Animals owned by the provided actor.
      void printCurrentBoard()
      Print the current game board to the console.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GameBoard

        public GameBoard​(Game gameInstance)
        Create a new instance of GameBoard.
        Parameters:
        gameInstance - The instance of Game to which this board is related.
    • Method Detail

      • printCurrentBoard

        public void printCurrentBoard()
        Print the current game board to the console.
      • getBoardSpaceAtPosition

        public BoardSpace getBoardSpaceAtPosition​(int index)
      • getOwnedAnimals

        public java.util.List<Animal> getOwnedAnimals​(Player actor)
        Fetches all the Animals owned by the provided actor.
        Parameters:
        actor - Player
        Returns:
        List of Animals owned by the player