Crate chess

Crate chess 

Source
Expand description

§Rust Chess Library

This is a chess library for rust with Gui.

§Examples

use chess::{run, ChessGui};

fn main() {
    // Create and run the Gui game
    run(ChessGui::default());
}

Structs§

Board
A representation of a chess board that implement FEN notation (Board::from_str).
Button
A struct of button for interact with the GUI.
Chess
A Standard Chess game.
ChessGui
GUI for the Chess game.
ChessMove
Represent a ChessMove.
Theme
Describe the theme of the chess game (GUI).

Enums§

Align
Indicate how align the text (GUI).
CastleRights
What castle rights does a particular player have?
Color
Represent a color in Chess game.
Direction
Describe 8 directions.
Error
Error that can happen during the game.
File
Describe a file (column) on a chess board.
GameState
The Result of the game.
Piece
Represent a chess piece.
Rank
Describe a rank (row) on a chess board.
Square
Represent a square on the chess board.

Constants§

ALL_COLORS
Enumerate all colors.
ALL_DIAGONAL
Enumerate all Direction in diagonal.
ALL_DIRECTION
Enumerate all Direction.
ALL_FILES
Enumerate all files.
ALL_LINE
Enumerate All Direction in line (vertical and horizontal).
ALL_PIECES
An array representing each Piece type, in order of ascending value.
ALL_RANKS
Enumerate all ranks.
ALL_SQUARES
Enumerate all Square.
BOARD_CELL_PX_SIZE
The pixel-size of a Board’s cell.
BOARD_PX_SIZE
The pixel-size of the board only (the board have a square form).
BOARD_SIZE
Number of cells in the Board.
NUM_COLORS
Numbers of Color in chess game.
NUM_DIAGONAL
Numbers of diagonal.
NUM_DIRECTION
Numbers of Direction.
NUM_FILES
Numbers of File.
NUM_LINES
Numbers of line (vertical and horizontal).
NUM_PIECES
Numbers of Piece.
NUM_RANKS
Numbers of Rank.
NUM_SQUARES
Numbers of Square.
NUM_THEMES
Numbers of Theme.
SCREEN_PX_SIZE
The pixel-size of the screen.
SIDE_SCREEN_PX_SIZE
The pixel-size of the side screen.
THEMES
Enumerate all Theme.
THEME_CORAL
Coral theme.
THEME_DUST
Dust theme.
THEME_EMERALD
Emerald theme.
THEME_MARINE
Marine theme.
THEME_SANDCASTLE
Sandcastle theme.
THEME_WHEAT
Wheat theme.

Functions§

run
Run the GUI.