Added Documentation
Added Test Cases Added Comments
This commit is contained in:
parent
ac25a1caea
commit
5c271b279f
42 changed files with 5279 additions and 52 deletions
15
core/src/api/player.rs
Normal file
15
core/src/api/player.rs
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue