diff --git a/src/bin/TurtleRemote.hx b/src/bin/TurtleRemote.hx deleted file mode 100644 index f84412f..0000000 --- a/src/bin/TurtleRemote.hx +++ /dev/null @@ -1,68 +0,0 @@ -package bin; - -import lib.ui.reactive.TurtleController; -import util.ObservableValue; -import kernel.turtle.Turtle; -import util.DummyObservable; -import lib.ui.reactive.TextElement; -import lib.ui.reactive.ReactiveUI; -import kernel.ui.WindowManager; -import kernel.ui.WindowContext; - -class TurtleRemote { - - private var context:WindowContext; - private var ui:ReactiveUI; - - public function new() { - - } - - public function execute() { - this.context = WindowManager.instance.createNewContext(); - - // var fuelText = new ObservableValue(""); - - // function updateFuel() { - // fuelText.set('Fuel: ${Turtle.instance.getFuelLevel()} / ${Turtle.instance.getFuelLimit()}'); - // } - // updateFuel(); - - // var fuel = new TextElement(fuelText); - - - // var bForward = new TextElement(DummyObservable.dummy("Forward"),Black,White,{ - // onClick: function() { - // Turtle.instance.forward(); - // updateFuel(); - // } - // }); - - // var bBackward = new TextElement(DummyObservable.dummy("Backward"),Black,White,{ - // onClick: function() { - // Turtle.instance.back(); - // updateFuel(); - // } - // }); - - // var bLeft = new TextElement(DummyObservable.dummy("Turn left"),Black,White,{ - // onClick: function() { - // Turtle.instance.turnLeft(); - // } - // }); - - // var bRight = new TextElement(DummyObservable.dummy("Turn right"),Black,White,{ - // onClick: function() { - // Turtle.instance.turnRight(); - // } - // }); - - var ctl = new TurtleController(); - - this.ui = new ReactiveUI(this.context,[ctl]); - - this.ui.render(); - - WindowManager.instance.focusContextToOutput(context,"main"); - } -}