예제 #1
0
파일: TulipeDao.cs 프로젝트: vabc3/Tulipe
        public int Save(TulipeGame game)
        {
            var id = Interlocked.Increment(ref this.cid);
            game.Id = id;
            dic[id] = game;

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

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

            return(id);
        }
예제 #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));
        }
예제 #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);
        }