Crash when changing deck type
Closed this issue · 1 comments
zapwai commented
When entering options and changing deck-type, I received an error about the integer type ($c is a string initially, but then $c is used as if it's an integer.)
In the get-new-deck-type method I changed $c to an integer, cast from the string value that is read. This works without crashing.
method get-new-deck-type {
self.clear;
self.draw-hands;
say (1) Regular (2) Aces (3) Jacks (4) Aces & Jacks (5) Sevens (6) Eights;
my Bool $br = False;
my Str $b;
loop {
$b = self.read-one-char;
my int $c = +$b;
given $c {
gdonald commented
Sorry for the late reply, I only just saw this. It's been fixed. Thanks for letting me know.