Skip to content
ExamplesOpen editor ↗

GODIMO_MOTSWI

→ UP_ARROW

The value standing for the up arrow key.

GODIMO_MOTSWI

You hand it to taetsiETshwerwe. It is the string 'ArrowUp'.

Note that on a canvas pebaY grows downwards, so moving up means subtracting from y:

fa (taetsiETshwerwe(GODIMO_MOTSWI)) { y = y - 3; }

GODIMO already ships as TOP for rulaganyaMokwalo; here it does the work of up, which is its ordinary meaning anyway.

Hop upwards
diri y = 150;

tiro setaLoeto() {
  thalaKanefase(400, 220);
  tlhalosa('Sediko se se tlhatlogang fa taetsi ya motswi o o lebileng godimo e tshwerwe. Tobetsa setshwantsho pele.');
}

tiro tshwantsha() {
  bokamorago(30, 34, 44);
  tlogelaMothalo();
  tlatsaMmala(240, 200, 100);

  fa (taetsiETshwerwe(GODIMO_MOTSWI)) { y = y - 4; }
  y = thibela(y + 1, 20, 180);

  thalaSediko(200, y, 40);
}

TLASE_MOTSWI, MOLEMA_MOTSWI, MOJA_MOTSWI, taetsiETshwerwe