Skip to content

Instantly share code, notes, and snippets.

Created August 6, 2022 08:44
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
use std::io::{stdout, BufWriter, Write};
use rand::Rng;
const DDSK: i32 = 0b011101110111;
const MASK: i32 = 0b111111111111;
fn main() {
let ddsk = ["ドド", "スコ"];
let mut rng = rand::thread_rng();
let mut buffer = 0;
let mut out = BufWriter::new(stdout().lock());
while buffer != DDSK {
let index = rng.gen_range(0b0..ddsk.len());
write!(out, "{}", ddsk[index]).unwrap();
buffer = (buffer << 1) & MASK | index as i32;
writeln!(out, "ラブ注入♡").unwrap();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment