Ruby blackjack

已完成 已发布的 5 年前 货到付款
已完成 货到付款

Ruby

Array extension

Please write a module that gives where behavior to an array of hashes. (See [login to view URL] and make it pass, or feel free to convert the tests to your favorite test framework.)

Simplified Blackjack

[login to view URL] contains initial work on a Blackjack simulation.

Your implementation should satisfy the following use cases and Blackjack rules:

As a Player I can get a hand with two cards in it

As a Dealer I can get a hand with two cards in it

As a Player I can see what card the dealer is showing

As a Player I can bust (lose immediately) when I am getting cards

As a Player I can blackjack (win immediately) when I am dealt cards (this is a simplification)

As a Dealer I can draw cards after the player until I win or lose

Rules:

Bust - Occurs when all possible hand values are greater than 21 points

Blackjack - Occurs when a player or dealer is dealt an ace and a 10-point card

Dealer - Stays on 17 or above

Please use your discretion in fixing/adding tests. You are free to use/convert to any testing framework you want.

Simulate a random round of the game (you don't have to write educated player decision logic - it could be just guesses)

For more information on blackjack, please refer to its wiki page.

Ruby Ruby on Rails

项目ID: #17134155

关于项目

2个方案 远程项目 活跃的5 年前

授予:

anandpadia

Hi, I am Andy and I am an entrepreneur with my startup focused on eCommerce business. In the process of working out a eCommerce solution startup that would work for India, I studied more than 50+ ecommerce solutions 更多

$50 USD 在3天内
(0条评论)
0.0