Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FUNCTION automaticSystem::INIT
- SELF.ptr=ptr_new(/ALLOCATE)
- RETURN, 1
- END
- PRO automaticSystem__define
- void = {automaticSystem, ptr:ptr_new(), grid:[], cellCont:[1], agentID:[], agentCell:[], algorithmPurp:[], algorithms: []} ; not autoMATION, but -MATON
- RETURN
- END
- FUNCTION automaticSystem::makeGrid, size
- old = 0
- FOR i = 0,N_Elements(size)-1 DO BEGIN
- new = []
- FOR j = 0, size[i]-1 DO BEGIN
- new = [new,old]
- ENDFOR
- old = new
- ENDFOR
- ; the final new is the answer
- SELF.grid = new
- END
- FUNCTION automaticSystem::CLEANUP
- ptr_free,self.ptr
- RETURN, 1
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement