This is a .NET online Coinche game. It requires 4 players to play. You can find the rules of this game on Wikipedia. If you want a more comprehensive version, here are the offical rules (in French), as defined by the Fédération Française de Belote.
To build and run the project you need to install:
- .NET Core 2.0.2
How to run the server & clients
Running the server
To run the Coinche server, use your terminal to navigate to the
Server/ folder located at the root of the repository & then run:
To run Coinche clients, use your terminal to navigate to the
Client/ folder located at the root of the repository & then run:
You can also use the following command if you want to run a client as an Artificial Intelligence:
dotnet run AI
You need to run 4 clients to start a Coinche game.
How to play
Once you've run the 4 clients, the game starts. You are now a player in a team of 2.
You are given 8 cards with different IDs. ex.:
Here is your card deck: | (18) 9 HEARTS | (2) 9 DIAMONDS | (21) Q HEARTS | (15) A CLUBS | (6) K DIAMONDS |
For the game to start, a player needs to make the highest bid (https://en.wikipedia.org/wiki/Coinche#Bidding). To make a bid you need to specify the value of your bid (80, 90, 100, 110, 120, 130, 140, 150 or 160) and a card suit (HEARTS, DIAMONDS, CLUBS or SPADES). Bidding example:
To pass, you just need to type:
If every player has passed, the cards are re-drawn and the bidding starts again. The bidding stops when only one player bids and allf the other ones pass or if someone has surcoinche'd.
The player who made the highest bid starts. He needs to type the ID (shown in the deck between parenthesis) of the card he wants to play.
After that, every player has to play. The one who wins the trick will increase the score of his team.
Once all the players are out of cards, the game ends. If the team who made the bid has at least the points of their contract and has more points than the other team, they win, and the other team looses.
Commands sent by the server to the clients.
||Send a message|
||Send the player's deck|
||Ask the player to bid|
||Accept the player's bid|
||Player's bid failed, ask him to bid again|
||Stop the bidding|
||Start another round of bidding when all the players have passed|
||Ask the client to play a card|
||Illegal play, ask the client to select another card|
||The card has been played|
||End of the game|
Commands sent by the clients to the server.
||Pass, don't bid|
||Send a bid to the server. [bid] can be an amount of points along with a suit (ex: "80 SPADES"), "COINCHE" or "SURCOINCHE"|
||Send the card to play to the server|
If you'd like to use Coinche's Xunit unit tests or create new tests for features you added, you can use the
Test project inside the
Use the command
dotnet test to run Coinche's unit tests.