From 7e72b194bd4f1a01a99010d7d8c9e1d21c60af21 Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Tue, 14 Apr 2020 23:22:38 -0400 Subject: [PATCH] Euchre::Dealer: Fix off-by-one on start_seat request Player 3 should be able to start, thank you. They have feelings too! --- lib/Euchre/Dealer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Euchre/Dealer.pm b/lib/Euchre/Dealer.pm index 8fb33c0..4ac4d99 100644 --- a/lib/Euchre/Dealer.pm +++ b/lib/Euchre/Dealer.pm @@ -241,7 +241,7 @@ sub start_game { if (!defined $msg->{start_seat} || $msg->{start_seat} < 0) { $game->{dealer} = int(rand(4)); - } elsif ($msg->{start_seat} < 3) { + } elsif ($msg->{start_seat} < 4) { # One less since start_new_round will rotate $game->{dealer} = ($msg->{start_seat} - 1); } else { -- libgit2 1.1.1