Skip to content

Instantly share code, notes, and snippets.

@elderica
Created November 30, 2023 08:37
Show Gist options
  • Save elderica/721259563813b9ead8c685367821b886 to your computer and use it in GitHub Desktop.
Save elderica/721259563813b9ead8c685367821b886 to your computer and use it in GitHub Desktop.
#lang racket
(define ds (vector "ドド" "スコ"))
(define (ddsk-rec history)
(if (= (bitwise-and history #x0fff) #x0777)
(displayln "ラブ注入♡")
(let ((i (random 2)))
(display (vector-ref ds i))
(ddsk-rec (bitwise-and #x0fff
(bitwise-ior (arithmetic-shift history 1) i))))))
(define (limit-history history)
(if (< 12 (vector-length history))
(vector-take-right history 12)
history))
(define (ddsk-rec2 history)
(if (equal? history (vector 0 1 1 1 0 1 1 1 0 1 1 1))
(displayln "ラブ注入♡")
(let ((i (random 2)))
(display (vector-ref ds i))
(ddsk-rec2 (limit-history (vector-append history (vector i)))))))
(ddsk-rec2 (vector))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment