chiro 0.1.3

A curses-style terminal view that runs inside a pixel buffer (Rewrite of chiropterm)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::shared::*;

#[derive(Clone)]
pub(crate) struct Affordances {
    next: u64
}

impl Affordances {
    pub fn new() -> Self {
        Affordances { next: 0 }
    }

    pub fn generate(&mut self) -> Affordance {
        let aff = Affordance(self.next);
        self.next = self.next.wrapping_add(1);
        aff
    }
}