chess/config.rs
1//! Config file that defines every constant
2//!
3//! | Component | axes |
4//! |-----------|--------|
5//! | foo.0 | x-axes |
6//! | foo.1 | y-axes |
7
8/// The pixel-size of the board only (the board have a square form).
9pub const BOARD_PX_SIZE: (f32, f32) = (800.0, 800.0);
10
11/// The pixel-size of the side screen.
12pub const SIDE_SCREEN_PX_SIZE: (f32, f32) = (360.0, BOARD_PX_SIZE.1);
13
14/// The pixel-size of the screen.
15pub const SCREEN_PX_SIZE: (f32, f32) = (BOARD_PX_SIZE.0 + SIDE_SCREEN_PX_SIZE.0, BOARD_PX_SIZE.1);
16
17/// Number of cells in the Board.
18pub const BOARD_SIZE: (i16, i16) = (8, 8);
19
20/// The pixel-size of a Board's cell.
21pub const BOARD_CELL_PX_SIZE: (f32, f32) = (
22 BOARD_PX_SIZE.0 / BOARD_SIZE.0 as f32,
23 BOARD_PX_SIZE.1 / BOARD_SIZE.1 as f32,
24);