Changed visibility from package to interal
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
public enum Kind: String, CaseIterable {
|
||||
internal enum Kind: String, CaseIterable {
|
||||
case Pawn, Knight, Bishop, Rook, Queen, King
|
||||
|
||||
public var value: Int8 {
|
||||
internal var value: Int8 {
|
||||
switch self {
|
||||
case .Pawn: 1
|
||||
case .Bishop: 3
|
||||
@@ -12,7 +12,7 @@ public enum Kind: String, CaseIterable {
|
||||
}
|
||||
}
|
||||
|
||||
public static subscript(_ c: Character) -> (Self, Color)? {
|
||||
internal static subscript(_ c: Character) -> (Self, Color)? {
|
||||
let v = c.uppercased()
|
||||
|
||||
guard
|
||||
@@ -39,7 +39,7 @@ public enum Kind: String, CaseIterable {
|
||||
}
|
||||
}
|
||||
|
||||
public protocol Piece {
|
||||
internal protocol Piece {
|
||||
var board: Board? { get }
|
||||
var color: Color { get }
|
||||
var unicodeRepresentation: String { get }
|
||||
@@ -47,6 +47,6 @@ public protocol Piece {
|
||||
var position: Square.Position { get }
|
||||
var pseudoLegalPositions: [Square.Position] { get }
|
||||
var legalPositions: [Square.Position] { get }
|
||||
func move(dst: Square.Position) -> Bool
|
||||
func isLegal(pos: Square.Position) -> Bool
|
||||
func move(to dst: Square.Position) -> Bool
|
||||
func isLegal(on pos: Square.Position) -> Bool
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user