Player Table, , Rule .
Table current_rule Rule, .
Rulewill expose methods such as bool is_legal_to_play(Card card, ...)or int get_score_for(Player player, ...), or even methods that make AI easier, such as float rate_move(Card card, ...)(then actually play one with a value of max rate_move).
Tablewill reveal the methods / properties, such as Rule get_current_rules(), Player get_current_player(), Player get_player_to_the_right_of(Player player), ...
Please note: I have no experience in C #; this is a fairly general OOP scheme that does not adhere to any particular pattern. Sue.
Ellipses cover additional parameters that may be required depending on your rules.
source
share