You can build the code via nix-build
:
nix-build
or using nix-shell:
nix-shell --run ./build.sh
./build.sh
To get your day solutions built do:
./batchBuild.sh dayN
This will result in files like builds/out/dayN/real_1_1.js
and so on.
To have your build output uploaded as well, add --upload ip1 ip2 ...
in the end of the command above.
Note that builds/in/dayN.in
must be defined for that. To pass the inputs from .in
file to your haxe code use @:inputFrom
metadata. Example:
class Model extends RobotModel {
@:inputFrom("real_1")
static function getInput():String return "";
override public function solution():Void {
// your solution goes here
}
}
./trikRun.sh [path] [ip]
Script.print calls are echoed to stdout while script runs. Ctrl+C stops execution on the TRIK brick. You can also omit the ip if it's meant to be 192.168.77.1
./upload.sh [path1 path2 ...] -- [ip1 ip2 ...]
--
is omittable if there's only one ip
nix-shell --pure
nix test.nix
haxe test.hxml
You might want to use xclip
CLI tool, to copy and paste code in the TRIK Studio faster. Example usage:
xclip -sel cli < result/patched.js
This command copies the contents of result/build.js
to your clipboard.
haxelib setup ./lib
Build dependencies:
haxelib install build.hxml
Tests dependencies:
haxelib install test.hxml
You can find our team solutions for the second stage online tasks in the archive
folder.
Documentation is currently being written. You can check out what's got documented so far in Wiki