feat: add yellow border to dames

This commit is contained in:
2026-09-02 17:57:07 +02:00
parent bee752ab6a
commit 4f8e799ee9
2 changed files with 9 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ use std::{
use log::debug; use log::debug;
use macroquad::{ use macroquad::{
color::{BLACK, Color, GREEN, RED, WHITE}, color::{BLACK, Color, GREEN, RED, WHITE, YELLOW},
input::{is_mouse_button_pressed, mouse_position}, input::{is_mouse_button_pressed, mouse_position},
math::{Rect, vec2}, math::{Rect, vec2},
shapes::{draw_circle, draw_circle_lines, draw_rectangle}, shapes::{draw_circle, draw_circle_lines, draw_rectangle},
@@ -159,8 +159,6 @@ impl Board {
let clicked_field = self.get_clicked_field(); let clicked_field = self.get_clicked_field();
debug!("Current state: {:?}", self.state);
match self.state { match self.state {
BoardState::View => { BoardState::View => {
if self.is_my_turn { if self.is_my_turn {
@@ -408,8 +406,15 @@ impl Board {
let thickness = 0.5; let thickness = 0.5;
draw_circle(center.x, center.y, r, color); draw_circle(center.x, center.y, r, color);
match pawn.state {
crate::logic::board::pawn::PawnState::Man => {
draw_circle_lines(center.x, center.y, r, thickness, BLACK); draw_circle_lines(center.x, center.y, r, thickness, BLACK);
} }
crate::logic::board::pawn::PawnState::Dame => {
draw_circle_lines(center.x, center.y, r, thickness, YELLOW);
}
}
}
} }
} }

View File

@@ -1,5 +1,3 @@
use std::convert::identity;
use tokio::sync::mpsc::{self, Sender}; use tokio::sync::mpsc::{self, Sender};
use log::{debug, error, info}; use log::{debug, error, info};