diff options
Diffstat (limited to 'lib/TextPrinter/StarGrid.pm')
-rw-r--r-- | lib/TextPrinter/StarGrid.pm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/TextPrinter/StarGrid.pm b/lib/TextPrinter/StarGrid.pm new file mode 100644 index 0000000..012cf07 --- /dev/null +++ b/lib/TextPrinter/StarGrid.pm @@ -0,0 +1,19 @@ +package TextPrinter::StarGrid; +use Moose; +use namespace::autoclean; +use Term::ANSIColor; + +extends 'TextPrinter'; + +my %colours = ( + '*' => color('white','on_black'), + ' ' => color('black','on_white'), +); + +sub draw_cell { + my ($self,$cell) = @_; + + print $colours{$cell},' '; +} + +1; |