Files
vilya/src
Ray Greenwell 70b9c7e43b It's a shame, because it's cool, but GameData isn't really needed anymore.
It acted as a proxy for the distributed ez properties, such that you could
set properties in the object and they'd magically go out over the network.
Like so:

    var data :Object = _gameCtrl.data;
    data.scores = [ 0, 0 ];
    data.startingPlayer = (Math.random() > .5) ? 0 : 1;

Of course, you could read props too and even iterate over them in a for
or for-each loop.

But, with the addition of testAndSet() and setImmediately() it was decided
that this direct access was ripe for confusion. Also, because there was
not a *second-level* proxy for every array property, it didn't send
individual array element updates over the network. I suppose I could write
an array proxy and create one for every array property set, but jeezgod
let's not get too crazy. Let's just keep it EZ and make people use our
nice well-documented methods.

If we want to add a method to EZGameControl for iterating over all
properties, we can. That might be useful...

There is one small concern, which is that now we're handing off our
internal storage Object to usercode, so someone would have to modify
their copy of EZGameControl and then they could... mess up their own game.
Whatever.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@221 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-02 08:38:45 +00:00
..