From 7dff6572462bdc59011f8ff8d1c6dc3a0494e44a Mon Sep 17 00:00:00 2001 From: Dylan Date: Thu, 22 Oct 2026 17:17:02 +1300 Subject: feat: Improvements to UI Now uses ratatui --- src/claude-player.rs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/claude-player.rs') diff --git a/src/claude-player.rs b/src/claude-player.rs index 4590c12..0a54ab5 100644 --- a/src/claude-player.rs +++ b/src/claude-player.rs @@ -1,6 +1,6 @@ use std::{collections::HashMap, time::Duration}; -use crate::{board::{GameBoard, Move, PieceType, Turn}, player::{CacheEntry, MinimaxPlayer}}; +use crate::{board::{is_jump, GameBoard, Move, PieceType, Turn}, player::{CacheEntry, MinimaxPlayer}}; /// Sheep that start the game: on the board plus in hand. const TOTAL_SHEEP: u32 = 20; @@ -61,19 +61,11 @@ impl MinimaxPlayer for ClaudePlayer + 2.0 * tiger_moves.len() as f32 } + fn name(&self) -> String { "Claude".to_string() } + fn time_limit(&self) -> Duration { self.time_limit } fn cache(&mut self) -> Option<&mut dyn crate::player::ScoreCache> { Some(&mut self.cache) } } - -/// True for a tiger move of two points, which always jumps (and kills) a sheep. -fn is_jump(mv: Move) -> bool -{ - match mv - { - Move::MoveTiger { from: (fx, fy), to: (tx, ty) } => fx.abs_diff(tx) == 2 || fy.abs_diff(ty) == 2, - _ => false, - } -} -- cgit v1.3.1