Class Board

java.lang.Object
it.polimi.ingsw.server.model.Board

public class Board
extends java.lang.Object
Represents the Board of the game. Contains the cells where the game will be played on.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static int SIDE  
  • Constructor Summary

    Constructors 
    Constructor Description
    Board()  
  • Method Summary

    Modifier and Type Method Description
    Cell findCell​(int x, int y)
    Used to find one specific cell on the board.
    boolean isInBoard​(int x, int y)
    Finds out whether a position is in the board or not.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • findCell

      public Cell findCell​(int x, int y)
      Used to find one specific cell on the board.
      Parameters:
      x - Row of the board.
      y - Column of the board.
      Returns:
      Returns cell if contained in board, null otherwise.
    • isInBoard

      public boolean isInBoard​(int x, int y)
      Finds out whether a position is in the board or not.
      Parameters:
      x - Coordinate x of the board.
      y - Coordinate y of the board.
      Returns:
      true if contained, false otherwise.