backend

Members list

Type members

Classlikes

class Bishop(c: String, p: Position) extends Piece

Bishop piece.

Bishop piece.

A bishop is a piece with long rang movements on diagonals.

Value parameters

c

The color of the piece.

p

The position of the piece.

Attributes

Supertypes
class Piece
class Object
trait Matchable
class Any
class Board

The board game.

The board game.

The board contains a 8x8 matrix with every square containing a piece, either black, white or neutral.

Attributes

Supertypes
class Object
trait Matchable
class Any
trait Castleable

A piece that can castle.

A piece that can castle.

By default, castle is authorize.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class King
class Rook
case class DataOutputFormat(winner: String, turn: String, board: Map[String, PieceInformation], timesPlay: Map[String, Array[Long]], gameClock: Long)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
class Game

A game of chess.

A game of chess.

A game is played between two players, white and black.

Attributes

Todo

add clocks

keep move orders somewhere

draw rules (50 moves, 3 positions)

Supertypes
class Object
trait Matchable
class Any
class GameAPI

A game of chess.

A game of chess.

A game is played between two players, white and black.

Attributes

Todo

add clocks

keep move orders somewhere

draw rules (50 moves, 3 positions)

Supertypes
class Object
trait Matchable
class Any
class King(c: String, p: Position) extends Piece, Castleable

King piece.

King piece.

A king is a piece which can move of one square in any direction.

Value parameters

c

The color of the piece.

p

The position of the piece.

Attributes

Supertypes
trait Castleable
class Piece
class Object
trait Matchable
class Any
class Knight(c: String, p: Position) extends Piece

Knight piece.

Knight piece.

A knight is a piece with L movements that can jump through pieces.

Value parameters

c

The color of the piece.

p

The position of the piece.

Attributes

Supertypes
class Piece
class Object
trait Matchable
class Any
object Main extends IOApp

Attributes

Supertypes
trait IOApp
class Object
trait Matchable
class Any
Self type
Main.type
class Pawn(c: String, p: Position) extends Piece

King piece.

King piece.

A pawn is a piece that can only go forward (facing its forward from its color pieces)

If a pawn make it to the other side of the board, it promotes in either a queen, a bishop, a knight or a rook.

Value parameters

c

The color of the piece.

p

The position of the piece.

Attributes

Supertypes
class Piece
class Object
trait Matchable
class Any
class Piece(c: String, p: Position)

A piece architecture. This is not an abstract class because empty squares will be filled with piece with the "_" color.

A piece architecture. This is not an abstract class because empty squares will be filled with piece with the "_" color.

Value parameters

c

The color of the piece

p

The position of the piece

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Bishop
class King
class Knight
class Pawn
class Queen
class Rook
Show all
case class PieceInformation(pieceType: String, pieceColor: String, availableMovements: List[String], isChecked: Boolean)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class PieceMovement(selectedSquare: String, targetSquare: String)

The main function of the chess game.

The main function of the chess game.

Creates a chess game and it's white turn to play. The game continue until one player win or a stalemate occurs

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
class Position(x: Int, y: Int)

A position in the chess board.

A position in the chess board.

Value parameters

x

The row value. Must be 0 <= x <= 7.

y

The column value. Must be 0 <= y <= 7

Attributes

Supertypes
class Object
trait Matchable
class Any
class Queen(c: String, p: Position) extends Piece

Queen piece.

Queen piece.

A queen is a piece than can move on any squares of its diagonals, its row and its columns.

Value parameters

c

The color of the piece.

p

The position of the piece.

Attributes

Supertypes
class Piece
class Object
trait Matchable
class Any
class Rook(c: String, p: Position) extends Piece, Castleable

Rook piece.

Rook piece.

A rook is a piece than can move on any squares of its row and its columns.

Value parameters

c

The color of the piece.

p

The position of the piece.

Attributes

Supertypes
trait Castleable
class Piece
class Object
trait Matchable
class Any

Value members

Concrete fields

final val frontEndPort: 4173
final val frontEndUrl: "localhost"

Implicits

Implicits

implicit val loggerFactory: LoggerFactory[IO]