Fix test.ts so it compiles

This commit is contained in:
Michal Moskal 2017-08-08 11:41:31 +02:00
parent 868ee826ab
commit b0145cf378

View File

@ -1,5 +1,5 @@
screen.clear()
screen.drawText(10, 30, "PXT!", Draw.Quad)
screen.drawText("PXT!", 10, 30, Draw.Quad)
screen.drawRect(40, 40, 20, 10, Draw.Fill)
output.setLights(LightsPattern.Orange)
@ -17,32 +17,32 @@ input.buttonLeft.onEvent(ButtonEvent.Click, () => {
})
input.buttonRight.onEvent(ButtonEvent.Click, () => {
screen.drawText(10, 60, "Right!")
screen.drawText("Right!", 10, 60)
})
input.buttonDown.onEvent(ButtonEvent.Click, () => {
screen.drawText(10, 60, "Down! ")
screen.drawText("Down! ", 10, 60)
})
input.buttonUp.onEvent(ButtonEvent.Click, () => {
screen.drawText(10, 60, "Up! ")
screen.drawText("Up! ", 10, 60)
})
let num = 0
input.touchSensor.onEvent(ButtonEvent.Click, () => {
screen.drawText(10, 60, "Click! " + num)
screen.drawText("Click! " + num, 10, 60)
num++
})
input.remoteTopLeft.onEvent(ButtonEvent.Click, () => {
screen.drawText(10, 60, "TOPLEFT " + num)
screen.drawText("TOPLEFT " + num, 10, 60)
num++
})
input.remoteTopRight.onEvent(ButtonEvent.Down, () => {
screen.drawText(10, 60, "TOPRIGH " + num)
screen.drawText("TOPRIGH " + num, 10, 60)
num++
})