Example #1
0
 public void addPlayer(player p)
 {
     using (var db = new bowlingEntities())
     {
         this.game.players.Add(p);
         try
         {
             db.SaveChanges();
         }
         catch (Exception e)
         {
             throw new Exception("Error", e);
         }
     }
 }
Example #2
0
 public void addPlayer(game g, player p)
 {
     using (var db = new bowlingEntities())
     {
         try
         {
             game game = db.games.Find(g.Id);
             game.players.Add(p);
             db.SaveChanges();
         }
         catch (Exception e)
         {
             throw new Exception("Error", e);
         }
     }
 }
Example #3
0
 public void removePlayer(staff s, game g, player p)
 {
     s.removePlayer(g, p);
 }
Example #4
0
 public void addPlayer(staff s, game g, player p)
 {
     s.addPlayer(g, p);
 }
Example #5
0
 public game createGame(player p)
 {
     return p.createGame();
 }
Example #6
0
 public void addPlayer(player currentPlayer, player p)
 {
     currentPlayer.addPlayer(p);
 }