public int Save(TulipeGame game) { var id = Interlocked.Increment(ref this.cid); game.Id = id; dic[id] = game; return id; }
public int Save(TulipeGame game) { var id = Interlocked.Increment(ref this.cid); game.Id = id; dic[id] = game; return(id); }
public int CreateGame(string owner, int p1c, int p2c, string p1, string p2) { var game = new TulipeGame(p1c, p2c) { Owner = owner, P1 = p1, P2 = p2, Characters = CreateList(p1c, p2c, p1, p2) }; return(dao.Save(game)); }
public int CreateGame(string owner ,int p1c, int p2c, string p1, string p2) { var game = new TulipeGame(p1c,p2c) { Owner = owner, P1 = p1, P2 = p2, Characters = CreateList(p1c, p2c, p1, p2) }; return dao.Save(game); }