Format all
Add some explanatory text
Complete whist
This is an implementation of a rules engine for the tamerlane server architecture.
It provides a working implementation of the rules of Bid Whist, as well as a reference implementation for tamerlane.
The game plays out in 5 phases.
+-------+ +-----+ +---------+ +-------+ +-------+ +-----+
| Deal | | Bid | | Discard | | Begin | | Play | | End |
+-------+ +-----+ +---------+ +-------+ +-------+ +-----+
| --------------------------\ | | | | |
|-| Deal 12 to each player. | | | | | |
| |-------------------------| | | | | |
| | | | | |
| Prompt first player for bid. | | | | |
|-------------------------------->| | | | |
| | ---------------------------\ | | | |
| |-| A player bids or passes. | | | | |
| | |--------------------------| | | | |
| | | | | |
| | There is another player who has not yet passed. Prompt them for bid. | | | |
| |---------------------------------------------------------------------- | | | |
| | | | | | |
| |<--------------------------------------------------------------------- | | | |
| | ----------------------------------------------------------------------------\ | | | |
| |-| There is only one player who hasn't passed - that player is the declarer. | | | | |
| | |---------------------------------------------------------------------------| | | | |
| | | | | |
| | Prompt declarer for their full bid. | | | |
| |--------------------------------------------------------------------------------->| | | |
| | | -------------------------------------\ | | |
| | |-| Declarer makes the their full bid. | | | |
| | | |------------------------------------| | | |
| | | ----------------------\ | | |
| | |-| Declarer draws six. | | | |
| | | |---------------------| | | |
| | | | | |
| | | Prompt declarer to discard six. | | |
| | |----------------------------------------->| | |
| | | | -------------------------\ | |
| | | |-| Declarer discards six. | | |
| | | | |------------------------| | |
| | | | -----------------------------\ | |
| | | |-| Declarer scores one trick. | | |
| | | | |----------------------------| | |
| | | | | |
| | | | Prompt declarer to play to first trick. | |
| | | |-------------------------------------------->| |
| | | | | |
| | | | | Not all players have played to the trick. Prompt the next player. |
| | | | |------------------------------------------------------------------ |
| | | | | | |
| | | | |<----------------------------------------------------------------- |
| | | | | --------------------------------------------------------------\ |
| | | | |-| All players have played to the trick. Determine the winner. | |
| | | | | |-------------------------------------------------------------| |
| | | | | |
| | | | | Prompt the winner to lead. |
| | | | |--------------------------- |
| | | | | | |
| | | | |<-------------------------- |
| | | | | ----------------------------------------------------------\ |
| | | | |-| All cards have been played. Determine the winning team. | |
| | | | | |---------------------------------------------------------| |
| | | | | |
| | | | Neither team has won. Redeal. | |
|<------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| | | | | |
| | | | | One team has won. End. |
| | | | |--------------------------------------------------------------------->|
| | | | | |