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

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

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

            return(id);
        }
Exemplo n.º 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));
        }
Exemplo n.º 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);
        }