Removed useless index

This commit is contained in:
cdricms
2024-06-28 00:12:04 +02:00
parent 1d7f1095d5
commit c79e80680c
2 changed files with 13 additions and 2 deletions

View File

@@ -33,6 +33,19 @@ public struct Square: Equatable {
}
}
public var value: Int8 {
return switch self {
case .a: 1
case .b: 2
case .c: 3
case .d: 4
case .e: 5
case .f: 6
case .g: 7
case .h: 8
}
}
public var description: String {
self.rawValue.uppercased()
}
@@ -60,7 +73,6 @@ public struct Square: Equatable {
}
public let position: Position
public let index: Int
public internal(set) var piece: Piece? = nil
public let color: Color