protected override async Task OnParametersSetAsync()
        {
            GridSize = 1.0 * Math.Min(Width, Height) / Scale;

            _game = ConwaysGameOfLife2D.CreateClassicGame(Scale);
            Random();
            _game.Save();
            StateHasChanged();

            await base.OnParametersSetAsync();
        }
예제 #2
0
        public void CreateClassicGame_ReturnsGameWithScaleSameAsProvided(int scale)
        {
            var game = ConwaysGameOfLife2D.CreateClassicGame(scale);

            Assert.Equal(scale, game.Scale);
        }