Started to work on king threats

This commit is contained in:
cdricms
2024-06-28 23:58:26 +02:00
parent 4f5b51f4ae
commit 0a220f14f5
13 changed files with 78 additions and 46 deletions

View File

@@ -1,4 +1,15 @@
public enum Color: UInt8 {
public enum Color: UInt8, CustomStringConvertible {
case Black = 0
case White = 1
public var description: String {
return switch self {
case .Black: "b"
case .White: "w"
}
}
public static prefix func ! (rhs: Self) -> Self {
return rhs == .White ? .Black : .White
}
}