anchor.diff:  
           (* Simulant *)
   
  -        /// Try to get a simulant at the given address.
  -        static member getOptSimulant<'a when 'a :> Simulant> (address : 'a Address) world =
  -            match address.Names with
  -            | [] -> World.getGame world :> Simulant :?> 'a |> Some
  -            | [_] -> World.getOptScreen (World.atosa address) world |> Option.map (fun s -> s :> Simulant :?> 'a)
  -            | [_; _] -> World.getOptGroup (World.atoga address) world |> Option.map (fun g -> g :> Simulant :?> 'a)
  -            | [_; _; _] -> World.getOptEntity (World.atoea address) world |> Option.map (fun e -> e :> Simulant :?> 'a)
  -            | _ -> failwith <| "Invalid simulant address '" + acstring address + "'."
  -
  -        static member private getOptSimulantForPublishing (address : Simulant Address) world =
  -            World.getOptSimulant address world
  -
           /// Query that the world contains a simulant at the given address.
  -        static member containsSimulant address world =
  -            Option.isSome <| World.getOptSimulant address world
  -
  -        /// Get a simulant at the given address (failing with an exception otherwise), then
  -        /// transform it with the 'by' procudure.
  -        static member getSimulantBy by address world =
  -            by ^ Option.get ^ World.getOptSimulant address world
  -
  -        /// Get a simulant at the given address (failing with an exception otherwise).
  -        static member getSimulant address world =
  -            World.getSimulantBy id address world
  -
  -        /// Set a simulant at the given address (failing with an exception if one doesn't exist).
  -        static member setSimulant<'a when 'a :> Simulant> (simulant : 'a) (address : 'a Address) world =
  -            match address.Names with
  -            | [] -> World.setGame (simulant :> obj :?> Game) world
  -            | [_] -> World.setScreen (simulant :> obj :?> Screen) (Address.changeType<'a, Screen> address) world
  -            | [_; _] -> World.setGroup (simulant :> obj :?> Group) (Address.changeType<'a, Group> address) world
  -            | [_; _; _] -> World.setEntity (simulant :> obj :?> Entity) (Address.changeType<'a, Entity> address) world
  -            | _ -> failwith <| "Invalid simulant address '" + acstring address + "'."
  -
  -        /// Update a simulant at the given address with the given 'updater' procedure.
  -        static member updateSimulantAndW updater address world =
  -            let simulant = World.getSimulant address world
  -            let (simulant, world) = updater simulant world
  -            World.setSimulant simulant address world
  -
  -        /// Update a simulant with the given 'updater' procedure at the given address.
  -        static member updateSimulantW updater address world =
  -            World.updateSimulantAndW (fun simulant world -> (updater simulant world, world)) address world
  -
  -        /// Update a simulant with the given 'updater' procedure at the given address.
  -        static member updateSimulant updater address world =
  -            World.updateSimulantW (fun simulant _ -> updater simulant) address world
  -
  -        /// Update the world with the given 'updater' procedure that uses the simulant at given
  -        /// address in its computation.
  -        static member updateBySimulant updater address world : World =
  -            let simulant = World.getSimulant address world
  -            updater simulant world
  -
  -        /// Update a lensed value at the given address and the world with the given 'updater' procedure.
  -        static member updateLensedAndW expr lens world : World =
  -            Lens.update expr (lens @-> World.lens) world
  -
  -        /// Update a lensed value with the given 'updater' procedure at the given address.
  -        static member updateLensedW expr lens world : World =
  -            Lens.updateS expr lens world
  -
  -        /// Update a lensed value with the given 'updater' procedure at the given address.
  -        static member updateLensed expr lens world : World =
  -            World.updateLensedW (fun lensed _ -> expr lensed) lens world
  -
  -        /// Update the world with the given 'updater' procedure that uses the lensed value at given
  -        /// address in its computation.
  -        static member updateByLensed expr lens world : World =
  -            expr (Lens.get world lens) world
  -            
  -    /// A marker interface for simulation types (Game, Screen, Group, Entity).
  -    /// The only methods that have a place in here are those used internally by Nu's event system.
  -    and SimulantRep =
  -        interface
  -            /// Get the entity's publishing priority.
  -            abstract GetPublishingPriority : (EntityRep -> World -> single) -> World -> single
  -            abstract SimulantAddress : Simulant Address
  -        end
  -
  -    and [<StructuralEquality; NoComparison>] GameRep =
  -        { GameAddress : Game Address }
  -        
  -        interface SimulantRep with
  -            member this.GetPublishingPriority _ _ = GamePublishingPriority
  -            member this.SimulantAddress = World.atoua this.GameAddress
  -        end
  -        
  -        member this.GetId world = (World.getGame world).Id
  -        member this.GetCreationTimeNp world = (World.getGame world).CreationTimeNp
  -        member this.GetDispatcherNp world = (World.getGame world).DispatcherNp
  -        member this.GetXtension world = (World.getGame world).Xtension
  -
  -        /// Query that a game dispatches in the same manner as the dispatcher with the target type.
  -        member this.DispatchesAs (dispatcherTargetType : Type) world =
  -            Reflection.dispatchesAs dispatcherTargetType (this.GetDispatcherNp world)
  -
  -    and [<StructuralEquality; NoComparison>] ScreenRep =
  -        { ScreenAddress : Screen Address }
  -        
  -        interface SimulantRep with
  -            member this.GetPublishingPriority _ _ = ScreenPublishingPriority
  -            member this.SimulantAddress = World.atoua this.ScreenAddress
  -        end
  -
  -        member this.GetId world = (World.getScreen this.ScreenAddress world).Id
  -        member this.GetName world = (World.getScreen this.ScreenAddress world).Name
  -        member this.GetCreationTimeNp world = (World.getScreen this.ScreenAddress world).CreationTimeNp
  -        member this.GetDispatcherNp world = (World.getScreen this.ScreenAddress world).DispatcherNp
  -        member this.GetXtension world = (World.getScreen this.ScreenAddress world).Xtension
  -        member this.GetIdling world = this.GetScreenStateNp world = IdlingState
  -
  -        /// Query that a screen dispatches in the same manner as the dispatcher with the target type.
  -        member this.DispatchesAs (dispatcherTargetType : Type) world =
  -            Reflection.dispatchesAs dispatcherTargetType (this.GetDispatcherNp world)
  -
  -    and [<StructuralEquality; NoComparison>] GroupRep =
  -        { GroupAddress : Group Address }
  -        
  -        interface SimulantRep with
  -            member this.GetPublishingPriority _ _ = GroupPublishingPriority
  -            member this.SimulantAddress = World.atoua this.GroupAddress
  -        end
  -
  -        member this.GetId world = (World.getGroup this.GroupAddress world).Id
  -        member this.GetName world = (World.getGroup this.GroupAddress world).Name
  -        member this.GetCreationTimeNp world = (World.getGroup this.GroupAddress world).CreationTimeNp
  -        member this.GetDispatcherNp world = (World.getGroup this.GroupAddress world).DispatcherNp
  -        member this.GetXtension world = (World.getGroup this.GroupAddress world).Xtension
  -
  -        /// Query that a group dispatches in the same manner as the dispatcher with the target type.
  -        member this.DispatchesAs (dispatcherTargetType : Type) (groupRep : GroupRep) world =
  -            Reflection.dispatchesAs dispatcherTargetType (this.GetDispatcherNp world)
  -
  -    and [<StructuralEquality; NoComparison>] EntityRep =
  -        { EntityAddress : Entity Address }
  -
  -        interface SimulantRep with
  -            member this.GetPublishingPriority getEntityPublishingPriority world = getEntityPublishingPriority this world
  -            member this.SimulantAddress = World.atoua this.EntityAddress
  -        end
  -        
  -        member this.GetId world = (World.getEntity this.EntityAddress world).Id
  -        member this.GetName world = (World.getEntity this.EntityAddress world).Name
  -        member this.GetCreationTimeNp world = (World.getEntity this.EntityAddress world).CreationTimeNp
  -        member this.GetDispatcherNp world = (World.getEntity this.EntityAddress world).DispatcherNp
  -        member this.GetFacetNames world = (World.getEntity this.EntityAddress world).FacetNames
  -        member this.GetFacetsNp world = (World.getEntity this.EntityAddress world).FacetsNp
  -        member this.GetPosition world = (World.getEntity this.EntityAddress world).Position
  -        member this.SetPosition value world = World.updateEntity (fun entity -> { entity with Position = value}) this.EntityAddress world
  -        member this.GetDepth world = (World.getEntity this.EntityAddress world).Depth
  -        member this.SetDepth value world = World.updateEntity (fun entity -> { entity with Depth = value}) this.EntityAddress world
  -        member this.GetSize world = (World.getEntity this.EntityAddress world).Size
  -        member this.SetSize value world = World.updateEntity (fun entity -> { entity with Size = value}) this.EntityAddress world
  -        member this.GetRotation world = (World.getEntity this.EntityAddress world).Rotation
  -        member this.SetRotation value world = World.updateEntity (fun entity -> { entity with Rotation = value}) this.EntityAddress world
  -        member this.GetVisible world = (World.getEntity this.EntityAddress world).Visible
  -        member this.SetVisible value world = World.updateEntity (fun entity -> { entity with Visible = value}) this.EntityAddress world
  -        member this.GetViewType world = (World.getEntity this.EntityAddress world).ViewType
  -        member this.SetViewType value world = World.updateEntity (fun entity -> { entity with ViewType = value}) this.EntityAddress world
  -        member this.GetPublishChanges world = (World.getEntity this.EntityAddress world).PublishChanges
  -        member this.SetPublishChanges value world = World.updateEntity (fun entity -> { entity with PublishChanges = value}) this.EntityAddress world
  -        member this.GetPersistent world = (World.getEntity this.EntityAddress world).Persistent
  -        member this.SetPersistent value world = World.updateEntity (fun entity -> { entity with Persistent = value}) this.EntityAddress world
  -        member this.GetOptOverlayName world = (World.getEntity this.EntityAddress world).OptOverlayName
  -        member this.SetOptOverlayName value world = World.updateEntity (fun entity -> { entity with OptOverlayName = value}) this.EntityAddress world
  -        member this.GetXtension world = (World.getEntity this.EntityAddress world).Xtension
  -        member this.SetXtension xtension world = World.updateEntity (fun entity -> { entity with Xtension = xtension}) this.EntityAddress world
  -        
  -        member this.UpdateXtension updater world =
  -            let xtension = this.GetXtension world
  -            let xtension = updater xtension
  -            this.SetXtension xtension world
  -
  -        member this.SetPositionSnapped snap position world =
  -            let snapped = Math.snap2F snap position
  -            this.SetPosition snapped world
  -
  -        member this.GetTransform world : Transform =
  -            { Position = this.GetPosition world
  -              Depth = this.GetDepth world
  -              Size = this.GetSize world
  -              Rotation = this.GetRotation world }
  -
  -        member this.SetTransform positionSnap rotationSnap transform world =
  -            let transform = Math.snapTransform positionSnap rotationSnap transform
  -            world |>
  -                this.SetPosition transform.Position |>
  -                this.SetDepth transform.Depth |>
  -                this.SetSize transform.Size |>
  -                this.SetRotation transform.Rotation
  -
  -        /// Query that an entity dispatches in the same manner as the dispatcher with the target type.
  -        member this.DispatchesAs (dispatcherTargetType : Type) world =
  -            Reflection.dispatchesAs dispatcherTargetType (this.GetDispatcherNp world)
  -
  -    /// Provides a way to make user-defined dispatchers, facets, and various other sorts of game-
  -    /// specific values.
  -    and NuPlugin () =
  -
  -        /// Make user-defined subsystems such that Nu can utilitze them at run-time.
  -        abstract MakeSubsystems : unit -> (string * Subsystem) list
  -        default this.MakeSubsystems () = []
  -        
  -        /// Optionally make a user-defined game dispatchers such that Nu can utililize it at run-time.
  -        abstract MakeOptGameDispatcher : unit -> GameDispatcher option
  -        default this.MakeOptGameDispatcher () = None
  -        
  -        /// Make user-defined screen dispatchers such that Nu can utililize them at run-time.
  -        abstract MakeScreenDispatchers : unit -> ScreenDispatcher list
  -        default this.MakeScreenDispatchers () = []
  -        
  -        /// Make user-defined group dispatchers such that Nu can utililize them at run-time.
  -        abstract MakeGroupDispatchers : unit -> GroupDispatcher list
  -        default this.MakeGroupDispatchers () = []
  -        
  -        /// Make user-defined entity dispatchers such that Nu can utililize them at run-time.
  -        abstract MakeEntityDispatchers : unit -> EntityDispatcher list
  -        default this.MakeEntityDispatchers () = []
  -        
  -        /// Make user-defined assets such that Nu can utililize them at run-time.
  -        abstract MakeFacets : unit -> Facet list
  -        default this.MakeFacets () = []
  -        
  -        /// Make the overlay routes that will allow Nu to use different overlays for the specified
  -        /// types. For example, a returned router of (typeof<ButtonDispatcher>.Name, Some "CustomButtonOverlay")
  -        /// will cause all buttons to use the overlay with the name "CustomButtonOverlay" rather
  -        /// than the default "ButtonDispatcher" overlay.
  -        abstract MakeOverlayRoutes : unit -> (string * string option) list
  -        default this.MakeOverlayRoutes () = []+        static member containsSimulant<'a when 'a :> SimulantRep> (simulantRep : 'a) world =
  +            match simulantRep :> SimulantRep with
  +            | :? GameRep -> true
  +            | :? ScreenRep as screenRep -> World.containsScreen screenRep world
  +            | :? GroupRep as groupRep -> World.containsGroup groupRep world
  +            | :? EntityRep as entityRep -> World.containsEntity entityRep world
  +            | _ -> failwithumf ()
positive.code:             File.Move (filePathTmp, filePath)
  
          /// Read a game hierarchy from an xml node.
          static member readGameHierarchy
              (gameNode : XmlNode) defaultDispatcherName defaultScreenDispatcherName defaultGroupDispatcherName defaultEntityDispatcherName world =
              let dispatcherName = Reflection.readDispatcherName defaultDispatcherName gameNode
              let dispatcher =
                  match Map.tryFind dispatcherName world.Components.GameDispatchers with
  
negative.code:                   Operation = fun world -> World.removeScreenImmediate screenRep world }
              World.addTask task world
  
          /// Create a screen and add it to the world.
          static member createScreen dispatcherName optName world =
              let dispatcher = Map.find dispatcherName world.Components.ScreenDispatchers
              let screen = Screen.make dispatcher optName
              Reflection.attachFields dispatcher screen
              let screenRep = { ScreenAddress = ntoa<Screen> screen.Name }
              let world = World.addScreen (screen, Map.empty) screenRep world
              (screenRep, world)
          
          /// Create a screen with a dissolving transition, and add it to the world.
          static member createDissolveScreen dissolveData dispatcherName optName world =
              let optDissolveImage = Some dissolveData.DissolveImage
              let (screenRep, world) = World.createScreen dispatcherName optName world
              let world = screenRep.SetIncoming { TransitionDescriptor.make Incoming with TransitionLifetime = dissolveData.IncomingTime; OptDissolveImage = optDissolveImage } world
              let world = screenRep.SetOutgoing { TransitionDescriptor.make Outgoing with TransitionLifetime = dissolveData.OutgoingTime; OptDissolveImage = optDissolveImage } world
              (screenRep, world)
  
          /// Write a screen hierarchy to an xml writer.
          static member writeScreen (writer : XmlWriter) screenRep world =
              let screen = World.getScreen screenRep world
              let groupReps = World.getGroupRepsInScreen screenRep world
              writer.WriteAttributeString (DispatcherNameAttributeName, (screen.DispatcherNp.GetType ()).Name)
              Reflection.writePropertiesFromTarget tautology3 writer screen
              writer.WriteStartElement GroupsNodeName
              World.writeGroups writer groupReps world
              writer.WriteEndElement ()
  
          /// Write a screen hierarchy to an xml file.
          static member writeScreenToFile (filePath : string) screenRep world =
              let filePathTmp = filePath + ".tmp"
              let writerSettings = XmlWriterSettings ()
              writerSettings.Indent <- true
              use writer = XmlWriter.Create (filePathTmp, writerSettings)
              writer.WriteStartElement RootNodeName
              writer.WriteStartElement ScreenNodeName
              World.writeScreen writer screenRep world
              writer.WriteEndElement ()
              writer.WriteEndElement ()
              writer.Dispose ()
  