             let error = JSONError.missing(keyPath: keyPath)
             log?.print("\(error)", for: .errors)
         }
+        
+        /**
+         Logs an error for the invalid key value
+         
+         - parameter keyPath: Teh key whose value was invalid
+         - parameter value: The invalid value
+         */
+        func logInvalid(keyPath: String, value: CustomStringConvertible) {
+            let error = JSONError.invalid(keyPath: keyPath, value: value)
+            log?.print("\(error)", for: .errors)
+        }
 
         // isGameOngoing
         if let ongoingGame = topLevelDict["\(JSONKey.isGameOngoing)"] as? Bool {

                var tank = Tank(centerX: 0.0, centerY: 0.0, heading: 0.0, isMoving: false, isAlive: false, canShoot: nil, name: nil)
                
                // x
                if let x = tankDict["\(JSONKey.x)"] as? Double {
                    tank.centerX = x
                } else {
                    logMissing(keyPath: "\(JSONKey.otherTanks) > \(JSONKey.x)")
                }
                
                // y
                if let y = tankDict["\(JSONKey.y)"] as? Double {
                    tank.centerY = y
                } else {
                    logMissing(keyPath: "\(JSONKey.otherTanks) > \(JSONKey.y)")
                }
                
                // heading
                if let heading = tankDict["\(JSONKey.heading)"] as? Double {
                    tank.heading = heading
                } else {
                    logMissing(keyPath: "\(JSONKey.otherTanks) > \(JSONKey.heading)")

        if let tankDict = topLevelDict["\(JSONKey.myTank)"] as? [String : Any] {
            
            // x
            let myTankXKeyPath = "\(JSONKey.myTank) > \(JSONKey.x)"
            if let x = tankDict["\(JSONKey.x)"] as? Double {
                if x < 0.0 { logInvalid(keyPath: myTankXKeyPath, value: x) }
                self.myTank.centerX = x
            } else {
                logMissing(keyPath: myTankXKeyPath)
            }
            
            // y
            let myTankYKeyPath = "\(JSONKey.myTank) > \(JSONKey.y)"
            if let y = tankDict["\(JSONKey.y)"] as? Double {
                if y < 0.0 { logInvalid(keyPath: myTankYKeyPath, value: y) }
                self.myTank.centerY = y
            } else {
                logMissing(keyPath: myTankYKeyPath)
            }
            
            // heading
            let myTankHeadingKeyPath = "\(JSONKey.myTank) > \(JSONKey.heading)"
            if let heading = tankDict["\(JSONKey.heading)"] as? Double {
                if heading < 0.0 { logInvalid(keyPath: myTankHeadingKeyPath, value: heading) }
                self.myTank.heading = heading
            } else {
                logMissing(keyPath: myTankHeadingKeyPath)
            }
            
            // isMoving
