Documentation

Game logic

v3 · Preview

Framework v3 is an opt-in preview available to everyone. New games use the stable framework by default.

Scores and game end

scores

scores returns every seat's score after every move.

pub struct Score {
    pub public_points: Vec<f64>,
    pub private_points: Vec<f64>,
}
  • Column i of a seat's score is public_points[i] + private_points[i]. The client names each column: see Scores.
  • Seats rank by the first column, highest first. The second column breaks a tie on the first, and so on.
  • During play, every seat sees each other seat's public points and only its own private points. Use private points for scores a seat must not see yet, such as hidden objectives.

is_game_over

Returns whether the match has ended. It receives the scores scores just computed. Once it returns true, nobody is offered anything and every later move is refused.

Need a hand with this?

Join our Discord