Skip to content

Instantly share code, notes, and snippets.

View lozh's full-sized avatar

Laurence Hygate lozh

View GitHub Profile
(defn rgb-distance-squared
"Euclidean distance squared between two rgb values"
[[r1 g1 b1] [r2 g2 b2]]
(let [r (- r1 r2)
g (- g1 g2)
b (- b1 b2)]
(+
(* r r)
(* g g)
(* b b))))
(ns ^{:doc
"Bejewelled Blitz (Facebook) player
Clojure program to play Bejewelled Blitz on Facebook
Work in progress
Only works with game on primary monitor
First you need to determine where the game board is on the screen
then set the :x and :y values in the game-loc def appropriately