 
 
 (defn test-pawn-moves[]
-(is (= '("Pa2a3")
-       (map (partial move->algebraic-notation starting-position)
-                 (pawn-moves starting-position [0 1])))))
+  (is (= '("Pa2a3")
+         (map (partial move->algebraic-notation starting-position)
+              (pawn-moves starting-position [0 1])))))
 
 (defn test-not-in-check[]
   (is (not (:in-check starting-position)))
   )
 (defn test-in-check[]
   (is (:in-check 
-  (string->position "rK" :white) )
-  ))
+        (string->position "rK" :white) )
+      ))
 (defn test-checkmated[]
   (is (:checkmated 
-  (string->position "PPPP\nK  r" :white) )
-  ))
+        (string->position "PPPP\nK  r" :white) )
+      ))
 ;; (moves (string->position "rK" :black) )
 ;;
 ;; (king-location (string->position "rK" :white))

  "Each location of the chessboard is identified by a unique coordinate pair—a letter and a number. The vertical column of squares (called files) from White's left (the queenside) to his right (the kingside) are labeled a through h. The horizontal rows of squares (called ranks) are numbered 1 to 8 starting from White's side of the board. Thus each square has a unique identification of file letter followed by rank number. (For example, White's king starts the game on square e1; Black's knight on b8 can move to open squares a6 or c6.)")

(defn is-knight?[x]
  (contains? #{"n" "N"} x)
  )
(defn is-king?[x]
  (contains? #{"k" "K"} x)
  )

(defn is-pawn?[x]
  (contains? #{"P" "p"} x)
  )

(def piece-color 
  {"r" :black "n" :black "b" :black "q" :black "k" :black
   "R" :white "N" :white "B" :white "Q" :white "K" :white
   "P" :white})

(defn friendly-square? [position location]
  (and (occupied? position location)

;;  defn move
;; From wikipedia:
;; A FEN record contains six fields. The separator between fields is a space. The fields are:
;; Piece placement (from white's perspective). Each rank is described, starting with rank 8 and ending with rank 1; within each rank, the contents of each square are described from file "a" through file "h". Following the Standard Algebraic Notation (SAN), each piece is identified by a single letter taken from the standard English names (pawn = :P, knight = :N, bishop = :B, rook = :r, queen = :Q and king = :K).[1] White pieces are designated using upper-case letters ("PNBRQK") while black pieces use lowercase ("pnbrqk"). Empty squares are noted using digits 1 through 8 (the number of empty squares), and "/" separates ranks.
;; Active color. "w" means White moves next, :b means Black.
;; Castling availability. If neither side can castle, this is "-". Otherwise, this has one or more letters: :K (White can castle kingside), :Q (White can castle queenside), :k (Black can castle kingside), and/or :q (Black can castle queenside).
;; En passant target square in algebraic notation. If there's no en passant target square, this is "-". If a pawn has just made a two-square move, this is the position "behind" the pawn. This is recorded regardless of whether there is a pawn in position to make an en passant capture.[2]
;; Halfmove clock: This is the number of halfmoves since the last capture or pawn advance. This is used to determine if a draw can be claimed under the fifty-move rule.
;; Fullmove number: The number of the full move. It starts at 1, and is incremented after Black's move.
