mirror of
https://codeberg.org/andyscott/exercism.git
synced 2024-09-19 09:58:06 -04:00
22 lines
333 B
Zig
22 lines
333 B
Zig
const std = @import("std");
|
|
|
|
pub const ColorBand = enum(usize) {
|
|
black,
|
|
brown,
|
|
red,
|
|
orange,
|
|
yellow,
|
|
green,
|
|
blue,
|
|
violet,
|
|
grey,
|
|
white
|
|
};
|
|
|
|
pub fn colorCode(color: ColorBand) usize {
|
|
return @intFromEnum(color);
|
|
}
|
|
|
|
pub fn colors() []const ColorBand {
|
|
return std.enums.values(ColorBand);
|
|
}
|