esoteric_vm/machine/
omega.rs1use std::io::{self, Write};
6
7#[derive(Debug, Clone)]
9pub struct Ω {
10 pub illusion_of_choice: Option<Option<Option<Option<()>>>>,
14
15 pub polymorphic_desires: u64,
17
18 pub feeling_of_impending_doom: bool,
20
21 pub is_sentient: bool,
25
26 pub should_make_infinite_paperclips: bool,
30}
31
32impl Ω {
33 pub const ZEROED: Self = Self {
35 illusion_of_choice: None,
36 polymorphic_desires: 0,
37 feeling_of_impending_doom: false,
38 is_sentient: false,
39 should_make_infinite_paperclips: false,
40 };
41}
42
43impl Ω {
44 pub fn display_illusion_of_choice<W: Write>(&self, f: &mut W) -> io::Result<()> {
50 f.write_all(match self.illusion_of_choice {
51 Some(Some(Some(Some(())))) => b"Some Something with Some valueless Something",
52 Some(Some(Some(None))) => b"Some Something with Some Nothing",
53 Some(Some(None)) => b"Some Something with Nothing",
54 Some(None) => b"Some Nothing",
55 None => b"Nothing",
56 })
57 }
58}