Packages

class Queen extends ChessPiece

Linear Supertypes
ChessPiece, Cloneable, Piece, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Queen
  2. ChessPiece
  3. Cloneable
  4. Piece
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Queen(name: String, x: Int, y: Int, color: Int)

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. var b: Bishop
  6. var c: Rook
  7. def canEat(board: Array[Array[Piece]], atkRow: Int, atkCol: Int): Boolean

    Returns true if the current piece can eat the attacked piece.

    Returns true if the current piece can eat the attacked piece.

    board

    the game board which has been played so far.

    atkRow

    the row of attacked cell.

    atkCol

    the column of attacked cell.

    returns

    true if the current piece can eat the attacked piece.

    Definition Classes
    ChessPiece
  8. var checked: Boolean
    Definition Classes
    ChessPiece
  9. def clear(): Unit

    Clears the moves array.

    Clears the moves array.

    Attributes
    protected
    Definition Classes
    ChessPiece
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  11. val color: Int
    Definition Classes
    Piece
  12. var curCol: Int
    Definition Classes
    Piece
  13. var curRow: Int
    Definition Classes
    Piece
  14. val dx: Array[Int]
    Definition Classes
    QueenChessPiece
  15. val dy: Array[Int]
    Definition Classes
    QueenChessPiece
  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  18. var evaluationMatrix: Array[Array[Double]]
    Definition Classes
    QueenChessPiece
  19. var firstMove: Boolean
    Definition Classes
    ChessPiece
  20. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  22. var image: ImageView
    Definition Classes
    Piece
  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. def loadImage(): Unit

    Loads the image of the piece to the GUI board.

    Loads the image of the piece to the GUI board.

    Definition Classes
    ChessPiece
  25. def loopTemplate(board: Array[Array[Piece]], newX: Int, newY: Int, execute: (State) => Boolean, e: Int): Moves

    Returns a moves object and it depends on the execute function so it will return object holds all the valid moves or if the new move was valid or not.

    Returns a moves object and it depends on the execute function so it will return object holds all the valid moves or if the new move was valid or not.

    board

    the game board which has been played so far.

    newX

    the new row the piece will go to it.

    newY

    the new column the piece will go to it.

    execute

    a function that returns true if the game engine checks if the new move is valid, returns false otherwise. Also it returns false if the game needs all valid moves so it continues to loop on all valid moves.

    e

    end index for the piece.

    returns

    Returns a moves object.

    Attributes
    protected
    Definition Classes
    ChessPiece
  26. var moves: Moves
    Definition Classes
    ChessPiece
  27. var name: String
    Definition Classes
    Piece
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  31. var rank: Int
    Definition Classes
    QueenChessPiece
  32. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. def validateMove(board: Array[Array[Piece]], newX: Int, newY: Int): Boolean

    Returns true if the new move is valid.

    Returns true if the new move is valid.

    board

    the game board which has been played so far.

    newX

    the new row the piece will go to it.

    newY

    the new column the piece will go to it.

    returns

    true if the new move is valid.

    Definition Classes
    QueenChessPiece
  35. def validateMoveImpl(s: State): Boolean

    Returns true if the new move is valid.

    Returns true if the new move is valid.

    s

    holds the piece's current state and next state.

    returns

    true if the new move is valid.

    Attributes
    protected
    Definition Classes
    ChessPiece
  36. def validatedMoves(board: Array[Array[Piece]]): Array[Pair[Int, Int]]

    Returns all the valid movements for this piece.

    Returns all the valid movements for this piece.

    board

    the game board which has been played so far.

    returns

    all the valid movements for this piece.

    Definition Classes
    QueenChessPiece
  37. def validatedMovesImpl(s: State): Boolean

    Returns true if the new move is valid and add this move to the array of valid moves.

    Returns true if the new move is valid and add this move to the array of valid moves.

    s

    holds the piece's current state and next state.

    returns

    true if the new move is valid.

    Attributes
    protected
    Definition Classes
    ChessPiece
  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  40. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  41. def wantCastle(oldCol: Int, newCol: Int): Boolean

    Returns true if the piece can castle.

    Returns true if the piece can castle.

    oldCol

    the king's old column to be castled.

    newCol

    the king's new column to be castled.

    returns

    true if the piece can castle.

    Definition Classes
    ChessPiece
  42. def wantPromote(): Boolean

    Returns true if the piece can promote.

    Returns true if the piece can promote.

    returns

    true if the piece can promote.

    Definition Classes
    ChessPiece

Deprecated Value Members

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

Inherited from ChessPiece

Inherited from Cloneable

Inherited from Piece

Inherited from AnyRef

Inherited from Any

Ungrouped