File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ my %commands =
3030sub columns is export { Terminal::API::get-window-size(). cols }
3131sub rows is export { Terminal::API::get-window-size(). rows }
3232
33- sub move-cursor (Int $ x , Int $ y ) is export {
33+ sub move-cursor (Int () $ x , Int () $ y ) is export {
3434 " \e [{ $ y + 1} ;{ $ x + 1} H"
3535}
3636
Original file line number Diff line number Diff line change @@ -240,21 +240,21 @@ multi method cell(Str $char) {
240240}
241241
242242# | Replace the contents of a single grid cell, specifying a hash with char and color keys
243- multi method change-cell ($ x , $ y , % c ) {
243+ multi method change-cell (Int () $ x , Int () $ y , % c ) {
244244 return unless 0 <= $ x < $ ! w && 0 <= $ y < $ ! h ;
245245 $ ! grid-string = ' ' ;
246246 @ ! grid [$ y ][$ x ] = Cell. fast-create(% c <char >, % c <color >);
247247}
248248
249249# | Replace the contents of a single grid cell with a single uncolored/unstyled character
250- multi method change-cell ($ x , $ y , Str $ char ) {
250+ multi method change-cell (Int () $ x , Int () $ y , Str $ char ) {
251251 return unless 0 <= $ x < $ ! w && 0 <= $ y < $ ! h ;
252252 $ ! grid-string = ' ' ;
253253 @ ! grid [$ y ][$ x ] = $ char ;
254254}
255255
256256# | Replace the contents of a single grid cell with a prebuilt Cell object
257- multi method change-cell ($ x , $ y , Cell $ cell ) {
257+ multi method change-cell (Int () $ x , Int () $ y , Cell $ cell ) {
258258 return unless 0 <= $ x < $ ! w && 0 <= $ y < $ ! h ;
259259 $ ! grid-string = ' ' ;
260260 @ ! grid [$ y ][$ x ] = $ cell ;
You can’t perform that action at this time.
0 commit comments