Skip to content

Commit

Permalink
tui: allow to start levels by just typing its number, omitting "start ".
Browse files Browse the repository at this point in the history
  • Loading branch information
penma committed Jun 8, 2009
1 parent 0540976 commit 1b56af9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Guckets/TUI/PlayLevelset.pm
Expand Up @@ -48,6 +48,7 @@ sub play {

if (!defined($_[0])) { goto prepare_next; }; # no-op

if ($_[0] =~ /^\d+$/ and @_ == 1) { unshift(@_, "start"); }
if ($_[0] eq "start") {
my $num = int($_[1] // 1) - 1;
if ($num < 0 or $num > scalar(@{$levelset->{levels}})) {
Expand Down

0 comments on commit 1b56af9

Please sign in to comment.