kishtarn555 / rekarel-core

MIT License
0 stars 0 forks source link

[Revamp] Add support for custom imports #17

Open kishtarn555 opened 2 weeks ago

kishtarn555 commented 2 weeks ago

Add support to include non-karel libraries

import some.module

Proposed solution

Add the option to load modules that are kinda like this:

class Module {
    package: string // "some.module"
    functions: Functions[] //Give the Karel signature of the function, but excecute Javascript code
    variables: Variable //Global variables that it adds
    requieredFunctions: FunctionSignature[] // What functions it requieres YOU to code
}

Why?

Difficulties

kishtarn555 commented 2 weeks ago

I... I don't know if this one, I'll be able to pull off before october

ccepeda commented 2 weeks ago

Importing modules could also allow to give the students already coded difficult-to-implement functions that they could use during the contest.

It is a good idea for a future revamp. It is not needed right now.