Beispiel #1
0
        public int Save(TulipeGame game)
        {
            var id = Interlocked.Increment(ref this.cid);
            game.Id = id;
            dic[id] = game;

            return id;
        }
Beispiel #2
0
        public int Save(TulipeGame game)
        {
            var id = Interlocked.Increment(ref this.cid);

            game.Id = id;
            dic[id] = game;

            return(id);
        }
Beispiel #3
0
        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));
        }
Beispiel #4
0
        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);
        }