554 @verb #2400:"gameover" this none this rxdo #9463 @program #2400:"gameover" this none this "horizontal lines" for i in [1..this.height] for j in [1..this.width - this.connect + 1] connlist = this.grid[i][j..j + this.connect - 1] connlist = $list_utils:remove_duplicates(connlist) if (length(connlist) == 1 && connlist != {0}) return $msg:mtell("winner") endif endfor endfor "for i in [1..(this.width - this.connect) + 1]" " for j in [1..this.height]" " conn = 0;" " for p in [1..2]" " for k in [1..this.connect]" " if (this.grid[j][(i - 1) + k] == p)" " conn = conn + 1;" " else" " conn = 0;" " endif" " if (conn == this.connect)" " return $msg:mtell(\"winner\");" " endif" " endfor" " endfor" " endfor" "endfor" "vertical lines" for i in [1..this.height - this.connect + 1] for j in [1..this.width] conn = 0 for p in [1..2] for k in [1..this.connect] if (this.grid[i - 1 + k][j] == p) conn = conn + 1 else conn = 0 endif if (conn == this.connect) return $msg:mtell("winner") endif endfor endfor endfor endfor "diagonal down" "diagonal up" "Last modified by Teya (#9463) on Sun Sep 22 22:41:10 2002 MDT." . 0