示例#1
0
        private bool canBeCreated(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                notifications.Push("Level name can't be empty", NotificationState.Bad);
                return(false);
            }

            if (LevelStorage.LevelExists(name))
            {
                notifications.Push($"\"{name}\" level already exists", NotificationState.Bad);
                return(false);
            }

            return(true);
        }