Skip to content

Instantly share code, notes, and snippets.

@colomon
Created November 9, 2010 02:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save colomon/668607 to your computer and use it in GitHub Desktop.
return gather {
take $header;
for (1..$.size).reverse -> $row {
take ' ' ~ $row.fmt("%2d ") ~ (map &format-colors, @.colors[$row-1].values)
~ $row.fmt(" %-2d") ~ $inter-board-space
~ $row.fmt("%2d ") ~ (map &format-heights, @.heights[$row-1].values)
~ $row.fmt(" %-2d") ~ "\n";
# take sprintf from-pretty(
# [~] ' ', $board-line, $inter-board-space, $board-line
# ),
# $row, (map &format-colors, @.colors[$row-1].values), $row,
# $row, (map &format-heights, @.heights[$row-1].values), $row;
# take "\n";
}
take $footer;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment