Department numbers: Difference between revisions
→Zig using an iterator: Adjusted formatting
Recombinant (talk | contribs) (→Zig using an iterator: fixed code) |
Recombinant (talk | contribs) (→Zig using an iterator: Adjusted formatting) |
||
Line 4,933:
}
}
/// 3 bit unsigned (u3) limits 0 <= department <= 7
const Departments = packed struct {
Line 4,940:
fire: u3,
};
const DepartmentsUnion = packed union {
departments: Departments,
together: u9,
};
const SolutionIterator = struct {
// police initialized to zero as adding one is the first operation for next()
|