diff --git a/README.md b/README.md index cb8eba0..43f5f88 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Goal: Generate 'hard' puzzles. ### Play a demo of the game [here](https://games.neophyte.me/sol_chess/) +![img](./img/sol_chess.png) + ## Install - Install Rust from [here](https://www.rust-lang.org/tools/install). diff --git a/img/sol_chess.png b/img/sol_chess.png new file mode 100644 index 0000000..b6177da Binary files /dev/null and b/img/sol_chess.png differ diff --git a/src/game.rs b/src/game.rs index 48bf8e9..4f15dae 100644 --- a/src/game.rs +++ b/src/game.rs @@ -3,8 +3,10 @@ use std::{ fmt::{self, Display, Formatter}, }; -use button::{Button, ButtonColor}; +use button::Button; +use color::UiColor; use macroquad::{math, prelude::*, rand}; +use shadow::draw_shadow; use sol_chess::{ board::{Board, BoardState}, generator::{self, RandomRange}, @@ -12,6 +14,8 @@ use sol_chess::{ use texture::PieceTexture; pub mod button; +pub mod color; +pub mod shadow; pub mod texture; pub struct MacroquadRandAdapter; @@ -43,11 +47,14 @@ pub struct Game { square_width: f32, window_height: f32, window_width: f32, + board_rect: Rect, squares: Vec, heading_rect: Rect, heading_font_size: f32, gp_btns: HashMap, mode_btns: HashMap, + rules: bool, + rules_btn: Vec