Packages

o

Chess

ChessController

object ChessController extends Controller

Linear Supertypes
Controller, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ChessController
  2. Controller
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def checkEndGame(gameBoard: Array[Array[Piece]], turn: Int): Boolean

    Returns ture if the game has ended.

    Returns ture if the game has ended.

    gameBoard

    the game board which has been played so far.

    turn

    identifies who will play.

    returns

    ture if the game has ended.

    Definition Classes
    ChessControllerController
  6. def checkMate(gameBoard: Array[Array[Piece]], turn: Int, r: Int = -1, c: Int = -1): Boolean

    Returns a boolean which indicates if the king of the specific player is in a check-mate.

    Returns a boolean which indicates if the king of the specific player is in a check-mate.

    gameBoard

    the game board of the current game.

    turn

    the color of the specific player.

    r

    for castling purpose only, we pass this parameter if we want to check for neighboring cells of the king is in check-mate.

    c

    for castling purpose only, we pass this parameter if we want to check for neighboring cells of the king is in check-mate.

    returns

    true if the king of the specific player is in check-mate and false otherwise.

  7. def checkTie(gameBoard: Array[Array[Piece]], turn: Int): Boolean

    Returns ture if the game has ended as tie.

    Returns ture if the game has ended as tie.

    gameBoard

    the game board which has been played so far.

    turn

    identifies who will play.

    returns

    ture if the game has ended as tie.

    Definition Classes
    ChessControllerController
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  9. def createState(gameBoard: Array[Array[Piece]], modifiedPiece: Piece, newX: Int, newY: Int): Piece

    Returns a piece object if a piece is removed.

    Returns a piece object if a piece is removed.

    gameBoard

    the game board which has been played so far.

    modifiedPiece

    the piece which will move.

    newX

    the new x coordinate for the piece.

    newY

    the new y coordinate for the piece.

    returns

    a piece object if a piece is removed, null otherwise.

    Definition Classes
    Controller
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. def findKing(gameBoard: Array[Array[Piece]], turn: Int): ChessPiece

    Returns the king piece for a specific player in the given board.

    Returns the king piece for a specific player in the given board.

    gameBoard

    the board which we want to search for the king in.

    turn

    the color of the desired king wither it is white or black.

    returns

    the king piece that we are searching for.

  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  14. def getPlayerPieces(color: Int): Pair[Int, Int]

    Returns the rows where the player's pieces lie.

    Returns the rows where the player's pieces lie.

    color

    color of the player's pieces.

    returns

    the rows where the player's pieces lie.

  15. def getRookPlace(move: State): Pair[Int, Int]

    Returns the rook old column and new column that the king will castle with it.

    Returns the rook old column and new column that the king will castle with it.

    move

    the game board which has been played so far.

    returns

    the rook old column and new column.

  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. def kingCastling(gameBoard: Array[Array[Piece]], move: State): Int

    Returns the rook new column that the king castled with it.

    Returns the rook new column that the king castled with it.

    gameBoard

    the game board which has been played so far.

    move

    the game board which has been played so far.

    returns

    the rook new column.

  19. def movementValidation(gameBoard: Array[Array[Piece]], state: State): MoveValidation

    Returns an object that holds two values the whole state and true if the move is valid.

    Returns an object that holds two values the whole state and true if the move is valid.

    gameBoard

    the game board which has been played so far.

    state

    object that holds the current state (if exists) and the new state.

    returns

    an object that holds a state and true if the move is valid.

    Definition Classes
    ChessControllerController
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  23. def restoreState(gameBoard: Array[Array[Piece]], modifiedPiece: Piece, removedPiece: Piece, state: State): Unit

    Restores the board to its previous state.

    Restores the board to its previous state.

    gameBoard

    the game board which has been played so far.

    modifiedPiece

    the piece that will return to its previous state.

    removedPiece

    a removed piece that will return to its previous state (if exists).

    state

    object that holds the current state (if exists) and the new state.

    Definition Classes
    Controller
  24. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  28. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Controller

Inherited from AnyRef

Inherited from Any

Ungrouped