kishtarn555 / rekarel-core

MIT License
0 stars 0 forks source link

[Revamp] Add arithmetic expressions #21

Open kishtarn555 opened 2 weeks ago

kishtarn555 commented 2 weeks ago

Add sum, subtraction, multiplication, integer division, modulo and parenthesis

void mult(x,y) {
  iterate(x*(y+1)) {
    putbeeper();
  }
}
ccepeda commented 2 weeks ago

As with other changes this would quickly turn Karel tasks into C++ easy tasks and in such case there is little point in learning Karel.

Lets leave this in standby

kishtarn555 commented 6 days ago

As an alternative that just came to mind, that I'll leave here for future reference. We could add a built in method mult(n) that multiplies n by the floor value and leaves it in the ground.

Same with division

Though I agree having to code your own division/multiplication has a Karel-charm to it