1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 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;