anchor.diff:                  match optNewPlayerActivity with
                   | Some (Action _)
                   | Some (Navigation _) ->
  -                    let gameplay = World.getScreen address world
  -                    let rand = Rand.make gameplay.OngoingRandState
  -                    let player = World.getEntity (getPlayerAddress address) world
  -                    let enemyAddresses = getEnemyAddresses address world
  -                    let enemies = World.getEntities enemyAddresses world
  -                    let (enemyDesiredTurns, rand) = determineDesiredEnemyTurns occupationMap player enemies rand
  -                    let enemies = Seq.map2 Entity.setDesiredTurn enemyDesiredTurns enemies
  -                    let world = World.setEntities enemies enemyAddresses world
  -                    let gameplay = Screen.setOngoingRandState (Rand.getState rand) gameplay
  -                    World.setScreen gameplay address world
  +                    let rand = Rand.make <| gameplay.GetOngoingRandState world
  +                    let player = proxyPlayer gameplay
  +                    let enemies = proxyEnemies gameplay world
  +                    let (enemyDesiredTurns, rand) = determineDesiredEnemyTurns occupationMap player enemies rand world
  +                    let enemies = Seq.map2 (fun (enemy : Entity) turn -> enemy.SetDesiredTurn turn) enemies enemyDesiredTurns
  +                    gameplay.SetOngoingRandState (Rand.getState rand) world
                   | Some NoActivity
                   | None -> world
   
               // run enemy activities in accordance with the player's current activity
               let world =
  -                let enemyAddresses = getEnemyAddresses address world
  -                let playerActivity = World.getEntityBy (fun player -> player.ActivityState) (getPlayerAddress address) world
  -                match playerActivity with
  +                let player = proxyPlayer gameplay
  +                let enemies = proxyEnemies gameplay world
  +                match player.GetActivityState world with
                   | Action _ -> world
                   | Navigation _ 
                   | NoActivity ->
  -                    let newEnemyActionActivities = determineEnemyActionActivities enemyAddresses world
  -                    let newEnemyNavigationActivities = determineEnemyNavigationActivities enemyAddresses world
  +                    let newEnemyActionActivities = determineEnemyActionActivities enemies world
  +                    let newEnemyNavigationActivities = determineEnemyNavigationActivities enemies world
                       if List.exists ActivityState.isActing newEnemyActionActivities then
  -                        let world = runEnemyActivities newEnemyActionActivities newEnemyNavigationActivities enemyAddresses address world
  -                        World.updateEntity cancelNavigation (getPlayerAddress address) world
  -                    else runEnemyNavigationActivities newEnemyNavigationActivities enemyAddresses address world
  +                        let world = runEnemyActivities newEnemyActionActivities newEnemyNavigationActivities enemies gameplay world
  +                        cancelNavigation player world
  +                    else runEnemyNavigationActivities newEnemyNavigationActivities enemies gameplay world
   
               // teh world
               world
  
positive.code:                 (List.ofSeq enemies)
                  []
  
          static let determineEnemyNavigationActivities enemyAddresses world =
              let enemies = World.getEntities enemyAddresses world
              List.foldBack
                  (fun (enemy : Entity) enemyActivities ->
                      let noCurrentEnemyActionActivity =
  
negative.code:                 else world
              else world
  
          static let runCharacterNavigation newNavigationDescriptor (character : Entity) gameplay world =
              let chain = chain {
                  do! update ^ character.SetActivityState ^ Navigation newNavigationDescriptor
                  do! during (fun world ->
                      match character.GetActivityState world with
                      | Navigation navigationDescriptor ->
                          newNavigationDescriptor.WalkDescriptor.WalkOriginM =
                              navigationDescriptor.WalkDescriptor.WalkOriginM
                      | Action _ -> false
                      | NoActivity -> false) ^ chain {
                      do! update ^ fun world ->
                          let navigationDescriptor =
                              match character.GetActivityState world with
                              | Navigation navigationDescriptor -> navigationDescriptor
                              | _ -> failwith "Unexpected match failure in InfinityRpg.GameplayDispatcherModule.runCharacterNavigation."
                          updateCharacterByNavigation navigationDescriptor character world
                      do! pass }}
              let observation = observe TickEventAddress character |> until (DeselectEventAddress ->>- gameplay.ScreenAddress)
              snd <| runAssumingCascade chain observation world
  
          static let runCharacterAction newActionDescriptor (character : Entity) gameplay world =
              // NOTE: currently just implements attack
              let chain = chain {
                  do! update ^ character.SetActivityState ^ Action newActionDescriptor
                  do! during (fun world -> ActivityState.isActing <| character.GetActivityState world) ^ chain {
                      do! update ^ fun world ->
                          let actionDescriptor =
                              match character.GetActivityState world  with
                              | Action actionDescriptor -> actionDescriptor
                              | _ -> failwithumf ()
                          let world = updateCharacterByAction actionDescriptor character world
                          runCharacterReaction actionDescriptor character gameplay world
                      do! pass }}
              let observation = observe TickEventAddress character |> until (DeselectEventAddress ->>- gameplay.ScreenAddress)
              snd <| runAssumingCascade chain observation world
  
          static let runCharacterNoActivity (character : Entity) world =
              character.SetActivityState NoActivity world
  
          static let runCharacterActivity newActivity character gameplay world =
              match newActivity with
              | Action newActionDescriptor -> runCharacterAction newActionDescriptor character gameplay world
              | Navigation newNavigationDescriptor -> runCharacterNavigation newNavigationDescriptor character gameplay world
              | NoActivity -> runCharacterNoActivity character world
  
          static let tryRunEnemyActivity gameplay world newActivity (enemy : Entity) =
              if newActivity <> NoActivity then
                  let world = enemy.SetDesiredTurn NoTurn world
                  runCharacterActivity newActivity enemy gameplay world
              else world
  
          static let runEnemyNavigationActivities enemyNavigationActivities enemies gameplay world =
              if Seq.exists ActivityState.isNavigating enemyNavigationActivities
              then Seq.fold2 (tryRunEnemyActivity gameplay) world enemyNavigationActivities enemies
              else world
  
          static let runEnemyActivities enemyActionActivities enemyNavigationActivities enemies gameplay world =
              let anyEnemyActionActivity = Seq.exists ActivityState.isActing enemyActionActivities
              let newEnemyActivities = if anyEnemyActionActivity then enemyActionActivities else enemyNavigationActivities
              Seq.fold2 (tryRunEnemyActivity gameplay) world newEnemyActivities enemies
              
          static let runPlayerTurn playerTurn gameplay world =
  
              // construct occupation map
              let occupationMap =
                  let field = proxyField gameplay
                  let fieldMap = field.GetFieldMapNp world
                  let enemies = proxyEnemies gameplay world
                  let enemyPositions = Seq.map (fun (enemy : Entity) -> enemy.GetPosition world) enemies
                  OccupationMap.makeFromFieldTilesAndCharactersAndDesiredTurn fieldMap.FieldTiles enemyPositions playerTurn
  
              // determine player activity
              let optNewPlayerActivity =
  