예제 #1
0
        public ReviewResult ArmyReview(int uid)
        {
            Player       player = GetPlayer(uid);
            ReviewResult result = player.CurrentKingdom.Army.Review();

            entities.SaveChanges();
            return(result);
        }
예제 #2
0
        public bool AddPlayer(Player player)
        {
            int exists = entity.Players.Count(p => p.UserId == player.UserId);

            exists += entity.Players.Count(p => p.Name == player.Name);
            if (exists > 0)
            {
                return(false);
            }
            else
            {
                entity.Players.Add(player);
                entity.SaveChanges();
                return(true);
            }
        }