                 let halfmoves = UInt(parts[4]),
                 let fullmoves = UInt(parts[5]) where fullmoves > 0
                 else { return nil }
-            var target: Location? = nil
+            var target: Square? = nil
             let targetStr = parts[3]
             let targetChars = targetStr.characters
             if targetChars.count == 2 {
-                guard let file = targetChars.first.flatMap(File.init),
-                    let rank = targetChars.last.flatMap({ char in
-                        return Int(String(char)).flatMap(Rank.init(_:))
-                    }) else {
-                        return nil
-                }
-                target = (file, rank)
+                guard let square = Square.init(targetStr) else {
+                    return nil
+                }
+                target = square
             } else {
                 guard targetStr == "-" else {
                     return nil

        public init(board: Board = Board(),
                    playerTurn: PlayerTurn = .White,
                    castlingAvailability: CastlingAvailability = .all,
                    enPassantTarget: Location? = nil,
                    halfmoves: UInt = 0,
                    fullmoves: UInt = 1) {
            self.board = board

                        guard let target = enPassantTarget else {
                            return false
                        }
                        return move.end == target
                    }
                } else {
                    guard board[move.end] == nil else {
