Skip to content

Instantly share code, notes, and snippets.

@hyotang666
Created March 18, 2016 21:32
Show Gist options
  • Save hyotang666/56778eb33591cf3674f8 to your computer and use it in GitHub Desktop.
Save hyotang666/56778eb33591cf3674f8 to your computer and use it in GitHub Desktop.
zundokokiyoshi!
(defun zundoko()
(do((bit(random 2)(random 2))
(memory 0 (shift memory bit)))
((= #b11110 memory)(princ :kiyoshi!))
(if(zerop bit)
(princ :doko)
(princ :zun))))
(defun shift(memory bit)
(ldb(byte 5 0)(dpb bit(byte 1 0)(ash memory 1))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment