示例#1
0
        public GameViewInfo GetPlayerView(int playerId, ClientCode clientCode)
        {
            GameModel game = accessLiveGame(playerId, clientCode);

            return(game.GetGameView(playerId));
        }
示例#2
0
        public void PerformMove(int playerId, Point[] positions, ClientCode clientCode)
        {
            GameModel game = accessLiveGame(playerId, clientCode);

            game.PerformMove(playerId, positions);
        }
示例#3
0
 private void accessObservedGame(int observerId, int gameId, ClientCode clientCode, Team team, out Observer observer, out GameModel game)
 {
     lock (_gameLock)
     {
         observer = getObserver(observerId, clientCode);
         game     = getGame(gameId);
         checkGameAccess(game, team);
         game.CheckRunState();
     }
 }