Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local simonProgSource = [[
- function thisIsATest(integer self, integer x, integer y)
- neighbour n of self do
- //if n.type == [DEFAULT_PT_STNE] then
- // self.type = [DEFAULT_PT_CLNE]
- // self.ctype = [DEFAULT_PT_WATR]
- //elseif n.type == [DEFAULT_PT_PLUT] then
- // self.type = [DEFAULT_PT_BANG]
- //end
- n.type = [DEFAULT_PT_WATR]
- end
- end
- ]]
- local prog = vm.loadProgram(simonProgSource);
- elem.allocate("SIMON", "TEST")
- elem.element(elem.SIMON_PT_TEST, elem.element(elem.DEFAULT_PT_PLUT))
- elem.property(elem.SIMON_PT_TEST, "Update", prog)
- elem.property(elem.SIMON_PT_TEST, "Name", "TEST")
Advertisement
Add Comment
Please, Sign In to add comment