fn opcode_rnd(&mut self) {
        let mut rng = thread_rng();
        let random_num: u8 = rng.gen(); // Generates a random u8 number

        self.v_reg[self.opcode.x()] = random_num & self.opcode.kk();
        self.pc += 2;
    }
/// Generate random byte AND kk, store in Vx
Generate random byte AND kk, store in Vx
Generate random byte AND kk store in Vx
fn opcode_rnd(&mut self) {
        let mut rng = thread_rng();
        let random_num: u8 = rng.gen(); // Generates a random u8 number
        self.v_reg[self.opcode.x()] = random_num & self.opcode.kk();
        self.pc += 2;
    }
fn opcode_rnd ( & mut self ) { let mut rng = thread_rng ( ) ; let random_num : u8 = rng . gen ( ) ; // Generates a random u8 number self . v_reg [ self . opcode . x ( ) ] = random_num & self . opcode . kk ( ) ; self . pc += 2 ; }
Generate random byte AND kk, store in Vx
Generate random byte AND kk store in Vx
&mut self
&mut self