Beispiel #1
0
 public Models.Game GetByTableId(int tableId)
 {
     using (GameServiceClient proxy = new GameServiceClient()) {
         GameServiceReference.Game game = proxy.GetByTableId(tableId);
         return(GameModelConverter.ConvertFromServiceGameToClientGame(game));
     }
 }
Beispiel #2
0
 public void CreateGAme(Models.Game game)
 {
     using (GameServiceClient proxy = new GameServiceClient()) {
         GameServiceReference.Game serviceGame = GameModelConverter.ConvertFromClientGameToServiceGame(game);
         proxy.CreateGame(serviceGame);
     }
 }
Beispiel #3
0
 public Models.Game StartGame(Models.GameTable clientGameTable)
 {
     using (GameServiceClient proxy = new GameServiceClient()) {
         GameServiceReference.GameTable serviceGameTable = GameModelConverter.ConvertFromClientGameTableToServiceGameTable(clientGameTable);
         GameServiceReference.Game      serviceGame      = proxy.StartGame(serviceGameTable);
         Models.Game clientGame = GameModelConverter.ConvertFromServiceGameToClientGame(serviceGame);
         return(clientGame);
     }
 }