There is an infinite deck, a number of players and the bank. The bank deals pointing a card to each player, and then gives each player an extra card until they stand or go past seven and a half. Then the bank plays itself.
It is played with the Spanish cards: for each suit (golds / cups / clubs / swords), the cards from 1 to 7, 10 (jack), 11 (knight) and 12 (king); the jacks, knight and kings are known as figures. For the game the cards from 1 to 7 are worth their number, and the figures are worth half. The suit of the deck has no influence. For example: if I have a 2, a 4 and an 11, my score is 6 and a half. If I have a 3 and a 5 my score is 8 and I went above seven and a half. Yes, I am interested in knowing, on the one hand, the value of the card for seven and a half, on the other hand the number (to be able to show it).
You have to determine which players won and which players lost. Those who have more than the bench win, and also they did not exceed 7 and a half points. E.g. If the bank makes 6 and a half, the players who made 7 or 7 and a half win.
Suppose that each player stands on a certain amount (eg one on 6, another on 5, etc.); idem banking.
- Java
- Maven
Java version must be 1.8 (to verify your current version write: java -version
in console)
1- Open intelliJ
2- Import project
1- Right click on folder /src/test/java
2- Click on Run 'All Tests'
1- Open console
2- Type mvn clean compile test