baccarat on prolog:
What need to be implemented:
- Involve only the dealer (computer) and a single player (the user)
- No betting, but the program need to keep track of the number of wins, losses and ties for the player.
- No sophisticated user interface - just a command line interface is required.
- May assume an infinite deck of cards(e.g. if the card 2 of hearts has been deal to a banker, it can also be dealt to the player).
Rules of the game summary:
- Two cards are dealt to the player and the banker (computer).
- If the score for the player or the banker is 8 or 9 - the game stops (e.g. it is a good enough score).
- Else the player can choose weather or not he wants to draw another card
- For the banker - if the score is less than 5, another card id dealt to the computer. Else, calculate the banker's score.
The scores are calculated as follows:
- The number on the cards = the scores (2,3,4,5,6,7,8,9 = 2 points,3 points etc).
- 10,Jack,Queen, King = 0 points
- Ace = 1 point
- Suits are irrelevant (e.g. 2 of hearts = 2 of spades = 2 of clubs = 2 of diamonds = 2 points)
The winner for the round is determined as follows:
- Whoever got score 9 or whoever is closest to 9. So, for example if player got 9 points and banker got 5, the player won. Another scenario - if player got 8 and banker got 10 - it is a tie (9 - 8 = 1 = 10 - 9). If the player got 7 and the banker got 10, the banker won.
The algorithm is very simple and I can sent you implementation of the above game on Java (took me about an hour to do it). What I need very similar behavior on prolog.
Due date is Friday, June 17th, 6 pm Pacific, but I would like to get it couple hours before that, say 2-3 pm Pacific.
Let me know if you're willing to do it and for how much.