NAME
tabrace - Type numbers digit by digit, as fast as you can
VERSION
This document describes version 0.010 of tabrace (from Perl distribution Games-TabRace), released on 2021-09-21.
SYNOPSIS
To start playing the game:
% tabrace <enter>
To type a number (type digit marked by x):
% tabrace <tab>
0 1 2 3 4x 5 6 7 8 9
% tabrace 4<tab>
40 41 42 43 44 45 46 47x 48 49
% tabrace 47<tab>
470x 471 472 473 474 475 476 477 478 479
% tabrace 470<tab>
4700 4701 4702 4703 4704 4705 4706 4707 4708x 4709
% tabrace 4708<tab>
% tabrace 4708 _<enter>
A demo screencast:
DESCRIPTION
Welcome to tabrace, a game played with tab completion. You must first enable tab completion for your shell. Here's how to do it in the various shells:
bash
% complete -C tabrace tabrace
Or alternatively, install shcompgen from CPAN using
cpanm -n App::shcompgen
.tcsh
% complete tabrace 'p/*/`tabrace`/'
Or alternatively, install shcompgen from CPAN using
cpanm -n App::shcompgen
.zsh
Put a file named
_tabrace
containing the text below somewhere to yourfpath
:#compdef tabrace _tabrace() { si=$IFS compadd -- $(COMP_LINE=$BUFFER COMP_POINT=$CURSOR tabrace) IFS=$si } _tabrace "$@"
Or alternatively, install shcompgen from CPAN using
cpanm -n App::shcompgen
.fish
% complete -c tabrace -f -a '(begin; set -lx COMP_SHELL fish; set -lx COMP_LINE (commandline); set -lx COMP_POINT (commandline -C); tabrace; end)'
The objective of the game is to type 3 numbers as fast as possible. For each number, you type "tabrace " then press Tab (Tab) to see digits between 0 to 9. There's an 'x' next to the correct digit. Type the correct digit and press Tab (Tab) again to see the next digit. After all digits are typed, press Enter to clock in your time for the number. Your points will be determined from how fast you typed the number. Do the same for the rest of the numbers to get the total score.
OPTIONS
--help
Display help and exit.
--version
Display version and exit.
--reset-game
Reset game.
--reset-high-scores
Reset high scores.
--high-scores
Show high scores and exit.
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/Games-TabRace.
SOURCE
Source repository is at https://github.com/perlancar/perl-Games-TabRace.
SEE ALSO
This game serves as a demo of the Complete module family, including Complete::Bash, Complete::Util, and so on.
Other games played by tab completion: Games::TabNoun.
AUTHOR
perlancar <perlancar@cpan.org>
CONTRIBUTING
To contribute, you can send patches by email/via RT, or send pull requests on GitHub.
Most of the time, you don't need to build the distribution yourself. You can simply modify the code, then test via:
% prove -l
If you want to build the distribution (e.g. to try to install it locally on your system), you can install Dist::Zilla, Dist::Zilla::PluginBundle::Author::PERLANCAR, and sometimes one or two other Dist::Zilla plugin and/or Pod::Weaver::Plugin. Any additional steps required beyond that are considered a bug and can be reported to me.
COPYRIGHT AND LICENSE
This software is copyright (c) 2021, 2016 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Games-TabRace
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.