Added Documentation

Added Test Cases
Added Comments
This commit is contained in:
Jan-Peter von Hunnius 2025-10-02 18:33:31 +02:00
parent ac25a1caea
commit 5c271b279f
42 changed files with 5279 additions and 52 deletions

15
core/src/api/player.rs Normal file
View file

@ -0,0 +1,15 @@
use crate::api::action::Action;
use crate::api::card::Card;
use crate::api::game_observer::GameObserver;
use crate::api::preferences::Preferences;
pub trait Player: GameObserver {
/// Initialize your player from the given preferences.
fn init(&mut self, prefs: Box<dyn Preferences>);
/// Receive your hole cards.
fn hole_cards(&mut self, c1: Card, c2: Card, seat: usize);
/// Requests an Action from the player. Called when it is the Player's turn to act.
fn get_action(&mut self) -> Action;
}