From ce47b9f03d4eb383c69c73bb8a90785d7f2b4cd3 Mon Sep 17 00:00:00 2001 From: florentdevk Date: Mon, 22 Jun 2026 21:55:39 +0200 Subject: [PATCH 01/13] =?UTF-8?q?fix:=20soft=2018=20against=20dealer=209/1?= =?UTF-8?q?0/Ace=20should=20Hit=EE=81=96=EE=80=BB=EE=83=81=EE=83=BB?= =?UTF-8?q?=EE=83=B9=EE=84=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Domain/BasicStrategy.php | 10 ++++++++-- tests/Domain/BasicStrategyTest.php | 13 +++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/Domain/BasicStrategy.php b/src/Domain/BasicStrategy.php index 6f6658e..d6cf0ad 100644 --- a/src/Domain/BasicStrategy.php +++ b/src/Domain/BasicStrategy.php @@ -9,8 +9,14 @@ public function decide(Hand $hand, Card $dealerCard): Decision $value = $hand->value(); $dealerValue = $dealerCard->numericValue(); - if ($hand->isSoft() && $value === 18 && $dealerValue >= 3 && $dealerValue <= 6) { - return Decision::Double; + if ($hand->isSoft() && $value === 18) { + if ($dealerValue >= 3 && $dealerValue <= 6) { + return Decision::Double; + } + if ($dealerValue === 2 || $dealerValue === 7 || $dealerValue === 8) { + return Decision::Stand; + } + return Decision::Hit; } if ($hand->isSoft() && $value === 17 && $dealerValue >= 3 && $dealerValue <= 6) { diff --git a/tests/Domain/BasicStrategyTest.php b/tests/Domain/BasicStrategyTest.php index d908571..ada746e 100644 --- a/tests/Domain/BasicStrategyTest.php +++ b/tests/Domain/BasicStrategyTest.php @@ -151,4 +151,17 @@ public function testSoft19ShouldAlwaysStand(): void $this->assertSame(Decision::Stand, $strategy->decide($hand, $dealerCard)); } + + public function testSoft18AgainstDealer9ShouldHit(): void + { + $strategy = new BasicStrategy(); + + $hand = new Hand(); + $hand->addCard(new Card('Ace', 'Hearts')); + $hand->addCard(new Card('7', 'Spades')); + + $dealerCard = new Card('9', 'Diamonds'); + + $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); + } } \ No newline at end of file From 60ba9b81e077abd116a1ffc4d37f9a6b3977a6fb Mon Sep 17 00:00:00 2001 From: florentdevk Date: Mon, 22 Jun 2026 21:59:32 +0200 Subject: [PATCH 02/13] =?UTF-8?q?feat:=20BasicStrategy=20doubles=20on=20so?= =?UTF-8?q?ft=2015-16=20against=20dealer=204-6=EE=81=96=EE=80=BB=EE=83=81?= =?UTF-8?q?=EE=83=BB=EE=83=B9=EE=84=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Domain/BasicStrategy.php | 4 ++++ tests/Domain/BasicStrategyTest.php | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/Domain/BasicStrategy.php b/src/Domain/BasicStrategy.php index d6cf0ad..aad7b66 100644 --- a/src/Domain/BasicStrategy.php +++ b/src/Domain/BasicStrategy.php @@ -23,6 +23,10 @@ public function decide(Hand $hand, Card $dealerCard): Decision return Decision::Double; } + if ($hand->isSoft() && $value >= 15 && $value <= 16 && $dealerValue >= 4 && $dealerValue <= 6) { + return Decision::Double; + } + if ($value >= 17) { return Decision::Stand; } diff --git a/tests/Domain/BasicStrategyTest.php b/tests/Domain/BasicStrategyTest.php index ada746e..d5a4a1d 100644 --- a/tests/Domain/BasicStrategyTest.php +++ b/tests/Domain/BasicStrategyTest.php @@ -164,4 +164,17 @@ public function testSoft18AgainstDealer9ShouldHit(): void $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); } + + public function testSoft15AgainstDealer4ShouldDouble(): void + { + $strategy = new BasicStrategy(); + + $hand = new Hand(); + $hand->addCard(new Card('Ace', 'Hearts')); + $hand->addCard(new Card('4', 'Spades')); + + $dealerCard = new Card('4', 'Diamonds'); + + $this->assertSame(Decision::Double, $strategy->decide($hand, $dealerCard)); + } } \ No newline at end of file From b840b0a19c42d54bbb60dfcb76a79531ef360a99 Mon Sep 17 00:00:00 2001 From: florentdevk Date: Mon, 22 Jun 2026 22:41:45 +0200 Subject: [PATCH 03/13] feat: BasicStrategy doubles on soft 13-14 against dealer 5-6 --- src/Domain/BasicStrategy.php | 4 ++++ tests/Domain/BasicStrategyTest.php | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/Domain/BasicStrategy.php b/src/Domain/BasicStrategy.php index aad7b66..50e9f53 100644 --- a/src/Domain/BasicStrategy.php +++ b/src/Domain/BasicStrategy.php @@ -27,6 +27,10 @@ public function decide(Hand $hand, Card $dealerCard): Decision return Decision::Double; } + if ($hand->isSoft() && $value >= 13 && $value <= 14 && $dealerValue >= 5 && $dealerValue <= 6) { + return Decision::Double; + } + if ($value >= 17) { return Decision::Stand; } diff --git a/tests/Domain/BasicStrategyTest.php b/tests/Domain/BasicStrategyTest.php index d5a4a1d..dc9800d 100644 --- a/tests/Domain/BasicStrategyTest.php +++ b/tests/Domain/BasicStrategyTest.php @@ -177,4 +177,17 @@ public function testSoft15AgainstDealer4ShouldDouble(): void $this->assertSame(Decision::Double, $strategy->decide($hand, $dealerCard)); } + + public function testSoft13AgainstDealer5ShouldDouble(): void + { + $strategy = new BasicStrategy(); + + $hand = new Hand(); + $hand->addCard(new Card('Ace', 'Hearts')); + $hand->addCard(new Card('2', 'Spades')); + + $dealerCard = new Card('5', 'Diamonds'); + + $this->assertSame(Decision::Double, $strategy->decide($hand, $dealerCard)); + } } \ No newline at end of file From 09d30def7b25556c519fced88150a97644b7505a Mon Sep 17 00:00:00 2001 From: florentdevk Date: Mon, 22 Jun 2026 22:42:32 +0200 Subject: [PATCH 04/13] test: hard 12 against dealer 2 should hit --- tests/Domain/BasicStrategyTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/Domain/BasicStrategyTest.php b/tests/Domain/BasicStrategyTest.php index dc9800d..5722ef9 100644 --- a/tests/Domain/BasicStrategyTest.php +++ b/tests/Domain/BasicStrategyTest.php @@ -190,4 +190,17 @@ public function testSoft13AgainstDealer5ShouldDouble(): void $this->assertSame(Decision::Double, $strategy->decide($hand, $dealerCard)); } + + public function testHard12AgainstDealer2ShouldHit(): void + { + $strategy = new BasicStrategy(); + + $hand = new Hand(); + $hand->addCard(new Card('7', 'Hearts')); + $hand->addCard(new Card('5', 'Spades')); + + $dealerCard = new Card('2', 'Diamonds'); + + $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); + } } \ No newline at end of file From 6f434a87d868f97214015df23b99844d42547ed3 Mon Sep 17 00:00:00 2001 From: florentdevk Date: Mon, 22 Jun 2026 22:43:07 +0200 Subject: [PATCH 05/13] test: hard 12 against dealer 3 should hit --- tests/Domain/BasicStrategyTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/Domain/BasicStrategyTest.php b/tests/Domain/BasicStrategyTest.php index 5722ef9..f522a49 100644 --- a/tests/Domain/BasicStrategyTest.php +++ b/tests/Domain/BasicStrategyTest.php @@ -203,4 +203,17 @@ public function testHard12AgainstDealer2ShouldHit(): void $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); } + + public function testHard12AgainstDealer3ShouldHit(): void + { + $strategy = new BasicStrategy(); + + $hand = new Hand(); + $hand->addCard(new Card('7', 'Hearts')); + $hand->addCard(new Card('5', 'Spades')); + + $dealerCard = new Card('3', 'Diamonds'); + + $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); + } } \ No newline at end of file From 2ec9e7dab906c2dcbfa695d933e71b44f6eab2cc Mon Sep 17 00:00:00 2001 From: florentdevk Date: Mon, 22 Jun 2026 22:44:59 +0200 Subject: [PATCH 06/13] feat: BasicStrategy handles soft 17 completely --- src/Domain/BasicStrategy.php | 7 +++++-- tests/Domain/BasicStrategyTest.php | 13 +++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/Domain/BasicStrategy.php b/src/Domain/BasicStrategy.php index 50e9f53..171d2ab 100644 --- a/src/Domain/BasicStrategy.php +++ b/src/Domain/BasicStrategy.php @@ -19,8 +19,11 @@ public function decide(Hand $hand, Card $dealerCard): Decision return Decision::Hit; } - if ($hand->isSoft() && $value === 17 && $dealerValue >= 3 && $dealerValue <= 6) { - return Decision::Double; + if ($hand->isSoft() && $value === 17) { + if ($dealerValue >= 3 && $dealerValue <= 6) { + return Decision::Double; + } + return Decision::Hit; } if ($hand->isSoft() && $value >= 15 && $value <= 16 && $dealerValue >= 4 && $dealerValue <= 6) { diff --git a/tests/Domain/BasicStrategyTest.php b/tests/Domain/BasicStrategyTest.php index f522a49..5ebb083 100644 --- a/tests/Domain/BasicStrategyTest.php +++ b/tests/Domain/BasicStrategyTest.php @@ -216,4 +216,17 @@ public function testHard12AgainstDealer3ShouldHit(): void $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); } + + public function testSoft17AgainstDealer7ShouldHit(): void + { + $strategy = new BasicStrategy(); + + $hand = new Hand(); + $hand->addCard(new Card('Ace', 'Hearts')); + $hand->addCard(new Card('6', 'Spades')); + + $dealerCard = new Card('7', 'Diamonds'); + + $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); + } } \ No newline at end of file From bbf2b1a45bf2b09c1234f2c62f09a77544056fe4 Mon Sep 17 00:00:00 2001 From: florentdevk Date: Mon, 22 Jun 2026 22:45:47 +0200 Subject: [PATCH 07/13] test: soft 13 against dealer 7 should hit --- tests/Domain/BasicStrategyTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/Domain/BasicStrategyTest.php b/tests/Domain/BasicStrategyTest.php index 5ebb083..939fdb2 100644 --- a/tests/Domain/BasicStrategyTest.php +++ b/tests/Domain/BasicStrategyTest.php @@ -229,4 +229,17 @@ public function testSoft17AgainstDealer7ShouldHit(): void $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); } + + public function testSoft13AgainstDealer7ShouldHit(): void + { + $strategy = new BasicStrategy(); + + $hand = new Hand(); + $hand->addCard(new Card('Ace', 'Hearts')); + $hand->addCard(new Card('2', 'Spades')); + + $dealerCard = new Card('7', 'Diamonds'); + + $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); + } } \ No newline at end of file From 4f786e4e3dd9f0d031f52ee08e7443f9cb0ed0ff Mon Sep 17 00:00:00 2001 From: florentdevk Date: Mon, 22 Jun 2026 22:47:55 +0200 Subject: [PATCH 08/13] fix: soft hands not captured by hard hand rules --- src/Domain/BasicStrategy.php | 4 ++-- tests/Domain/BasicStrategyTest.php | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/Domain/BasicStrategy.php b/src/Domain/BasicStrategy.php index 171d2ab..a4365b9 100644 --- a/src/Domain/BasicStrategy.php +++ b/src/Domain/BasicStrategy.php @@ -38,11 +38,11 @@ public function decide(Hand $hand, Card $dealerCard): Decision return Decision::Stand; } - if ($value >= 13 && $value <= 16 && $dealerValue >= 2 && $dealerValue <= 6) { + if (!$hand->isSoft() && $value >= 13 && $value <= 16 && $dealerValue >= 2 && $dealerValue <= 6) { return Decision::Stand; } - if ($value === 12 && $dealerValue >= 4 && $dealerValue <= 6) { + if (!$hand->isSoft() && $value === 12 && $dealerValue >= 4 && $dealerValue <= 6) { return Decision::Stand; } diff --git a/tests/Domain/BasicStrategyTest.php b/tests/Domain/BasicStrategyTest.php index 939fdb2..1783981 100644 --- a/tests/Domain/BasicStrategyTest.php +++ b/tests/Domain/BasicStrategyTest.php @@ -242,4 +242,17 @@ public function testSoft13AgainstDealer7ShouldHit(): void $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); } + + public function testSoft13AgainstDealer4ShouldHit(): void + { + $strategy = new BasicStrategy(); + + $hand = new Hand(); + $hand->addCard(new Card('Ace', 'Hearts')); + $hand->addCard(new Card('2', 'Spades')); + + $dealerCard = new Card('4', 'Diamonds'); + + $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); + } } \ No newline at end of file From 588976f0a366ce3aba30434526b50a7b8eab5d6b Mon Sep 17 00:00:00 2001 From: florentdevk Date: Mon, 22 Jun 2026 22:48:38 +0200 Subject: [PATCH 09/13] test: soft 16 against dealer 7 should hit --- tests/Domain/BasicStrategyTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/Domain/BasicStrategyTest.php b/tests/Domain/BasicStrategyTest.php index 1783981..1fb58b7 100644 --- a/tests/Domain/BasicStrategyTest.php +++ b/tests/Domain/BasicStrategyTest.php @@ -255,4 +255,17 @@ public function testSoft13AgainstDealer4ShouldHit(): void $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); } + + public function testSoft16AgainstDealer7ShouldHit(): void + { + $strategy = new BasicStrategy(); + + $hand = new Hand(); + $hand->addCard(new Card('Ace', 'Hearts')); + $hand->addCard(new Card('5', 'Spades')); + + $dealerCard = new Card('7', 'Diamonds'); + + $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); + } } \ No newline at end of file From 88f28b24aaad4451a8011718963b1cada5bddfd2 Mon Sep 17 00:00:00 2001 From: florentdevk Date: Mon, 22 Jun 2026 22:49:16 +0200 Subject: [PATCH 10/13] test: hard 11 against dealer Ace should hit --- tests/Domain/BasicStrategyTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/Domain/BasicStrategyTest.php b/tests/Domain/BasicStrategyTest.php index 1fb58b7..d325788 100644 --- a/tests/Domain/BasicStrategyTest.php +++ b/tests/Domain/BasicStrategyTest.php @@ -268,4 +268,17 @@ public function testSoft16AgainstDealer7ShouldHit(): void $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); } + + public function testHard11AgainstDealerAceShouldHit(): void + { + $strategy = new BasicStrategy(); + + $hand = new Hand(); + $hand->addCard(new Card('7', 'Hearts')); + $hand->addCard(new Card('4', 'Spades')); + + $dealerCard = new Card('Ace', 'Diamonds'); + + $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); + } } \ No newline at end of file From ad343bc8869d3eeb1855c59e05eea8e8ef40c919 Mon Sep 17 00:00:00 2001 From: florentdevk Date: Mon, 22 Jun 2026 22:50:57 +0200 Subject: [PATCH 11/13] test: hard 10 against dealer Ace should hit --- tests/Domain/BasicStrategyTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/Domain/BasicStrategyTest.php b/tests/Domain/BasicStrategyTest.php index d325788..589a296 100644 --- a/tests/Domain/BasicStrategyTest.php +++ b/tests/Domain/BasicStrategyTest.php @@ -281,4 +281,17 @@ public function testHard11AgainstDealerAceShouldHit(): void $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); } + + public function testHard10AgainstDealerAceShouldHit(): void + { + $strategy = new BasicStrategy(); + + $hand = new Hand(); + $hand->addCard(new Card('6', 'Hearts')); + $hand->addCard(new Card('4', 'Spades')); + + $dealerCard = new Card('Ace', 'Diamonds'); + + $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); + } } \ No newline at end of file From f5a5a95e67f7f4dc780a82dd30e933bdfabbe86c Mon Sep 17 00:00:00 2001 From: florentdevk Date: Mon, 22 Jun 2026 23:14:03 +0200 Subject: [PATCH 12/13] feat: add Surrender for hard 15-16 against dealer 9/10/Ace --- src/Domain/BasicStrategy.php | 10 ++++++- src/Domain/Decision.php | 1 + tests/Domain/BasicStrategyTest.php | 44 ++++++++++++++++++++++++++++-- 3 files changed, 52 insertions(+), 3 deletions(-) diff --git a/src/Domain/BasicStrategy.php b/src/Domain/BasicStrategy.php index a4365b9..7d0f2e9 100644 --- a/src/Domain/BasicStrategy.php +++ b/src/Domain/BasicStrategy.php @@ -38,6 +38,14 @@ public function decide(Hand $hand, Card $dealerCard): Decision return Decision::Stand; } + if (!$hand->isSoft() && $value === 16 && ($dealerValue === 9 || $dealerValue === 10 || $dealerValue === 11)) { + return Decision::Surrender; + } + + if (!$hand->isSoft() && $value === 15 && $dealerValue === 10) { + return Decision::Surrender; + } + if (!$hand->isSoft() && $value >= 13 && $value <= 16 && $dealerValue >= 2 && $dealerValue <= 6) { return Decision::Stand; } @@ -60,4 +68,4 @@ public function decide(Hand $hand, Card $dealerCard): Decision return Decision::Hit; } -} \ No newline at end of file +} diff --git a/src/Domain/Decision.php b/src/Domain/Decision.php index 048bb31..8983bba 100644 --- a/src/Domain/Decision.php +++ b/src/Domain/Decision.php @@ -8,4 +8,5 @@ enum Decision case Stand; case Double; case Split; + case Surrender; } \ No newline at end of file diff --git a/tests/Domain/BasicStrategyTest.php b/tests/Domain/BasicStrategyTest.php index 589a296..1675795 100644 --- a/tests/Domain/BasicStrategyTest.php +++ b/tests/Domain/BasicStrategyTest.php @@ -10,7 +10,7 @@ final class BasicStrategyTest extends TestCase { - public function testHard16AgainstDealerTenShouldHit(): void + public function testHard16AgainstDealerTenShouldSurrender(): void { $strategy = new BasicStrategy(); @@ -20,7 +20,7 @@ public function testHard16AgainstDealerTenShouldHit(): void $dealerCard = new Card('10', 'Diamonds'); - $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); + $this->assertSame(Decision::Surrender, $strategy->decide($hand, $dealerCard)); } public function testHard17ShouldStand(): void @@ -35,6 +35,7 @@ public function testHard17ShouldStand(): void $this->assertSame(Decision::Stand, $strategy->decide($hand, $dealerCard)); } + public function testHard12AgainstDealer4ShouldStand(): void { $strategy = new BasicStrategy(); @@ -294,4 +295,43 @@ public function testHard10AgainstDealerAceShouldHit(): void $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); } + + public function testHard16AgainstDealer9ShouldSurrender(): void + { + $strategy = new BasicStrategy(); + + $hand = new Hand(); + $hand->addCard(new Card('9', 'Hearts')); + $hand->addCard(new Card('7', 'Spades')); + + $dealerCard = new Card('9', 'Diamonds'); + + $this->assertSame(Decision::Surrender, $strategy->decide($hand, $dealerCard)); + } + + public function testHard15AgainstDealerTenShouldSurrender(): void + { + $strategy = new BasicStrategy(); + + $hand = new Hand(); + $hand->addCard(new Card('9', 'Hearts')); + $hand->addCard(new Card('6', 'Spades')); + + $dealerCard = new Card('10', 'Diamonds'); + + $this->assertSame(Decision::Surrender, $strategy->decide($hand, $dealerCard)); + } + + public function testHard16AgainstDealerAceShouldSurrender(): void + { + $strategy = new BasicStrategy(); + + $hand = new Hand(); + $hand->addCard(new Card('9', 'Hearts')); + $hand->addCard(new Card('7', 'Spades')); + + $dealerCard = new Card('Ace', 'Diamonds'); + + $this->assertSame(Decision::Surrender, $strategy->decide($hand, $dealerCard)); + } } \ No newline at end of file From 624d73f236e239d57a29cc633949c3392d2bbb2c Mon Sep 17 00:00:00 2001 From: florentdevk Date: Mon, 22 Jun 2026 23:33:51 +0200 Subject: [PATCH 13/13] test: add missing coverage tests for BasicStrategy --- tests/Domain/BasicStrategyTest.php | 52 ++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/tests/Domain/BasicStrategyTest.php b/tests/Domain/BasicStrategyTest.php index 1675795..eeaa732 100644 --- a/tests/Domain/BasicStrategyTest.php +++ b/tests/Domain/BasicStrategyTest.php @@ -334,4 +334,56 @@ public function testHard16AgainstDealerAceShouldSurrender(): void $this->assertSame(Decision::Surrender, $strategy->decide($hand, $dealerCard)); } + + public function testHard8ShouldAlwaysHit(): void + { + $strategy = new BasicStrategy(); + + $hand = new Hand(); + $hand->addCard(new Card('4', 'Hearts')); + $hand->addCard(new Card('4', 'Spades')); + + $dealerCard = new Card('6', 'Diamonds'); + + $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); + } + + public function testHard9AgainstDealer2ShouldHit(): void + { + $strategy = new BasicStrategy(); + + $hand = new Hand(); + $hand->addCard(new Card('5', 'Hearts')); + $hand->addCard(new Card('4', 'Spades')); + + $dealerCard = new Card('2', 'Diamonds'); + + $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); + } + + public function testHard9AgainstDealer7ShouldHit(): void + { + $strategy = new BasicStrategy(); + + $hand = new Hand(); + $hand->addCard(new Card('5', 'Hearts')); + $hand->addCard(new Card('4', 'Spades')); + + $dealerCard = new Card('7', 'Diamonds'); + + $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); + } + + public function testHard16AgainstDealer7ShouldHit(): void + { + $strategy = new BasicStrategy(); + + $hand = new Hand(); + $hand->addCard(new Card('9', 'Hearts')); + $hand->addCard(new Card('7', 'Spades')); + + $dealerCard = new Card('7', 'Diamonds'); + + $this->assertSame(Decision::Hit, $strategy->decide($hand, $dealerCard)); + } } \ No newline at end of file