         XCTAssertEqual(board.position, 25)
     }
     
-    func testBoardMoveToStart() {
-        XCTAssertEqual(board.position, 0)
-        board.move(15)
-        XCTAssertEqual(board.position, 15)
-        board.move(-25)
-        XCTAssertEqual(board.position, 0)
+    func testBoardMoveToSnakesHead() {
+      board.move(24)
+      XCTAssertEqual(board.position, 1)
     }
     
-    func testBoardHas4Snakes() {
-        XCTAssertEqual(board.snakes.count, 4)
+    func testBoardMoveToLadderStart() {
+        board.move(3)
+        XCTAssertEqual(board.position, 16)
     }
     
     func testAllSnakesHaveProperHeadAndTailEnd() {

        }
    }
    
}

    
    class Board {
        let size = 25
        let snakes: [(Int,Int)] = [(24, 1)]
        let ladders: [(Int,Int)] = [(3, 16)]
        
        var position = 0
        
        func move(numberOfFields: Int) {

            var newPosition: Int? = position + numberOfFields            
            
            let maybeResetePosition = (snakes + ladders).filter { (head, _) -> Bool in
                return head == newPosition!
            }.first?.1
            
            if let resetedPosition = maybeResetePosition {
               newPosition = resetedPosition
            }
            
             if (newPosition > size) {
                position = size
            } else {
                position = newPosition!
            }
        }
    }
