cell_count_neighbors   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/contrib/game-of-life.xtm

Implementation

(bind-func cell_count_neighbors
  (lambda (w x y)
    (+ (cell_value w (- x 1) (- y 1))
       (cell_value w (- x 1) y)
       (cell_value w (- x 1) (+ y 1))
       (cell_value w x (- y 1))
       (cell_value w x (+ y 1))
       (cell_value w (+ x 1) (- y 1))
       (cell_value w (+ x 1) y)
       (cell_value w (+ x 1) (+ y 1)))))


Back to Index

Similar Entries

  • aiProcess_SplitByBoneCount    scheme
  • cell_check_result    xtlang
  • cell_set_value    xtlang
  • cell_value    xtlang
  • file_word_count    xtlang
  • get_frame_count    xtlang
  • pm_count_devices    xtlang
  • word_count    xtlang