Changes between Version 44 and Version 45 of Clojure Client Tutorial


Ignore:
Timestamp:
Aug 8, 2011 1:05:59 PM (13 years ago)
Author:
kedwar10
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Clojure Client Tutorial

    v44 v45  
    143143* :move-for "mf"
    144144* :move-by "mb"
    145 * :move-to "mt"client.core=> (defn scan-area3 [quagent radius]
    146                (send-and-watch quagent :radar :now [radius]
    147                                nil
    148                                (fn [prev data] (rest data))
    149                                (fn [k r o n] (println "I found" (first n) "at" (rest n)))))   
    150 #'client.core/scan-area3
    151 client.core=> (scan-area3 :Bob 8000)                                                                                                                                                     
    152 :watcher303
    153 I found player at (611.700012 90.081947 0.000000)
    154 I found player at (32.000000 -90.000000 0.000000)
    155 I found info_player_deathmatch at (32.000244 -90.000000 0.223811)
    156 I found quagent_item_treasure at (572.168640 20.462269 0.901278)
    157 I found quagent_item_gold at (375.085327 56.309933 1.374918)
    158 I found quagent_item_gold at (1019.278626 42.455196 0.505915)
    159 I found quagent_item_treasure at (697.711304 63.434952 0.739097)
    160 I found quagent_item_gold at (905.141357 8.130102 0.569713)
    161 I found info_player_deathmatch at (0.125000 0.000000 90.000000)
     145* :move-to "mt"
    162146* :jump-once "ju"
    163147* :rotate "ro"
     
    417401
    418402{{{
    419 client.core=> (defn scan-area3 [quagent radius] (send-and-watch quagent :radar :now [radius] nil (fn [prev data] (rest data)) (fn [k r o n] (println "Item:" (first n) "Distance:" (second n)))))
     403client.core=> (defn scan-area3 [quagent radius]
     404                (send-and-watch quagent :radar :now [radius]
     405                                nil
     406                                (fn [prev data]
     407                                 (rest data))
     408                                (fn [k r o n]
     409                                 (println "Item:" (first n) "Distance:" (second n)))))
    420410#'client.core/scan-area3
    421411client.core=> (scan-area3 :Bob 8000)