Beispiel #1
0
        public LoginViewModel()
        {
            apiService        = new ApiService();
            navigationService = new NavigationService();
            dataService       = new DataService();
            dialogService     = new DialogService();
            sha256            = new Sha256Service();

            this.IsRemembered = true;
            this.IsEnabled    = true;
            this.isRunning    = false;
            InternetStatus();
        }
Beispiel #2
0
        public Game(IMetadata metadata, IPgn pgn)
        {
            Moves = pgn.Moves;

            // Adding PlyCount
            if (!metadata.Values.Any(tag => tag.Contains("[PlyCount ")))
            {
                metadata.Values.Add($"[PlyCount \"{PlyCount}\"]");
            }

            Metadata = string.Join(Environment.NewLine, metadata.Values);

            foreach (var tagPair in metadata.Values)
            {
                SetupTagPair(tagPair);
            }

            Hash = Sha256Service.GetHash(Moves);
        }