to logoturn.win.row :a :b :c ; ; winning row is if two pieces are down, ; and the third place is empty ; ; runresult ["true] will result in [true] ; first [true] will result in true ; first runresult ["true] will result in true ; We do this, since logo didn't like [(place :c) "true] ; directly in the command parts of ifelse. ; output l.or [ [ifelse (AND grid.me :a grid.me :b grid.empty :c) [first runresult [(place :c) "true]] ["false] ] [ifelse (AND grid.me :a grid.empty :b grid.me :c) [first runresult [(place :b) "true]] ["false] ] [ifelse (AND grid.empty :a grid.me :b grid.me :c) [first runresult [(place :a) "true]] ["false] ] ] end |