You may have noticed a bug in Lesson.Client. When you challenge someone else, they can't see your name. When you resign it works, but when they resign it crashes. What's going on?

Their machine cannot see your Player fact. They are only subscribed to their User, and your Player is not a successor of their User. Write a failing unit test in RemoteGameTest to see what's going on.
public void FlynnCanSeeHisOpponent()
    Player player = _flynn.Players.Single();
    Player opponent = player.Game.Players.FirstOrDefault(p => p != player);

To make this unit test pass and fix the bug, you are going to need to subscribe to the Game, not just to the User. Subscribing to your own user gives you every successor Player: your role in every game that you are playing. But it does not give you the other Players in the Game. Subscribe to all Games in which you are a Player. Publish all Players to their Game.

Last edited Aug 9, 2010 at 2:51 AM by MichaelLPerry1971, version 1


No comments yet.