zilogic-systems / zkarel

A Karel like environment for learning programming.
Apache License 2.0
1 stars 1 forks source link

Adding support for Rustlang #1

Open gnurenga opened 3 years ago

gnurenga commented 3 years ago

@bravegnu I like to add Rustlang support for Zkarel

bravegnu commented 3 years ago

Sure Rengaraj. Please submit a pull request.

gnurenga commented 3 years ago

Thank you @bravegnu

I was trying to create a template then i found we may not be able to use move function name since move is a keyword in rust.

fn main() {
    start();
    repeat(3) {
        move();
    }
    stop();
}

We can use karel_move()

fn main() {
    start();
    repeat(3) {
        karel_move();
    }
    stop();
}