BIG FORMATING COMMIT
This commit is contained in:
@@ -6,32 +6,32 @@ using tink.CoreApi;
|
||||
|
||||
class Turtle extends CLIAppBase {
|
||||
public function new() {
|
||||
registerSyncSubcommand("forward", (args)->{
|
||||
registerSyncSubcommand("forward", (args) -> {
|
||||
return perform(kernel.turtle.Turtle.instance.forward());
|
||||
});
|
||||
|
||||
registerSyncSubcommand("back", (args)->{
|
||||
registerSyncSubcommand("back", (args) -> {
|
||||
return perform(kernel.turtle.Turtle.instance.back());
|
||||
});
|
||||
|
||||
registerSyncSubcommand("left", (args)->{
|
||||
registerSyncSubcommand("left", (args) -> {
|
||||
return perform(kernel.turtle.Turtle.instance.turnLeft());
|
||||
});
|
||||
|
||||
registerSyncSubcommand("right", (args)->{
|
||||
registerSyncSubcommand("right", (args) -> {
|
||||
return perform(kernel.turtle.Turtle.instance.turnRight());
|
||||
});
|
||||
|
||||
registerSyncSubcommand("up", (args)->{
|
||||
registerSyncSubcommand("up", (args) -> {
|
||||
return perform(kernel.turtle.Turtle.instance.up());
|
||||
});
|
||||
|
||||
registerSyncSubcommand("down", (args)->{
|
||||
registerSyncSubcommand("down", (args) -> {
|
||||
return perform(kernel.turtle.Turtle.instance.down());
|
||||
});
|
||||
}
|
||||
|
||||
private function perform(outcome: Outcome<Noise,String>): Bool {
|
||||
private function perform(outcome:Outcome<Noise, String>):Bool {
|
||||
switch outcome {
|
||||
case Success(_):
|
||||
return true;
|
||||
@@ -40,5 +40,4 @@ class Turtle extends CLIAppBase {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user