<commit_before>// Copyright (c) 2007-2017 ppy Pty Ltd <<EMAIL>>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE

using System;
using System.Collections.Generic;
using OpenTK;
using osu.Desktop.Tests.Beatmaps;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Timing;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Beatmaps;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;

namespace osu.Desktop.Tests.Visual
{
    /// <summary>
    /// The most minimal implementation of a playfield with scrolling hit objects.
    /// </summary>
    public class TestCaseScrollingPlayfield : OsuTestCase
    {
        private readonly TestHitRenderer hitRenderer;

        public TestCaseScrollingPlayfield()
        {
            Clock = new FramedClock();

            var objects = new List<HitObject>();

            int time = 1500;
            for (int i = 0; i < 50; i++)
            {
                objects.Add(new TestHitObject { StartTime = time });

                time += 500;
            }

            Beatmap b = new Beatmap
            {
                HitObjects = objects,
                BeatmapInfo = new BeatmapInfo
                {
                    Difficulty = new BeatmapDifficulty(),
                    Metadata = new BeatmapMetadata()
                }
            };

            WorkingBeatmap beatmap = new TestWorkingBeatmap(b);

            Add(hitRenderer = new TestHitRenderer(beatmap, true));

            AddStep("Reverse direction", () => hitRenderer.Playfield.Reversed.Value = !hitRenderer.Playfield.Reversed);
        }

        private class TestHitRenderer : ScrollingHitRenderer<TestPlayfield, TestHitObject, TestJudgement>
        {
            public TestHitRenderer(WorkingBeatmap beatmap, bool isForCurrentRuleset)<commit_msg>Convert to local object.<commit_after>// Copyright (c) 2007-2017 ppy Pty Ltd <<EMAIL>>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE

using System;
using System.Collections.Generic;
using OpenTK;
using osu.Desktop.Tests.Beatmaps;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Timing;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Beatmaps;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;

namespace osu.Desktop.Tests.Visual
{
    /// <summary>
    /// The most minimal implementation of a playfield with scrolling hit objects.
    /// </summary>
    public class TestCaseScrollingPlayfield : OsuTestCase
    {
        public TestCaseScrollingPlayfield()
        {
            Clock = new FramedClock();

            var objects = new List<HitObject>();

            int time = 1500;
            for (int i = 0; i < 50; i++)
            {
                objects.Add(new TestHitObject { StartTime = time });

                time += 500;
            }

            Beatmap b = new Beatmap
            {
                HitObjects = objects,
                BeatmapInfo = new BeatmapInfo
                {
                    Difficulty = new BeatmapDifficulty(),
                    Metadata = new BeatmapMetadata()
                }
            };

            WorkingBeatmap beatmap = new TestWorkingBeatmap(b);

            TestHitRenderer hitRenderer;
            Add(hitRenderer = new TestHitRenderer(beatmap, true));

            AddStep("Reverse direction", () => hitRenderer.Playfield.Reversed.Value = !hitRenderer.Playfield.Reversed);
        }

        private class TestHitRenderer : ScrollingHitRenderer<TestPlayfield, TestHitObject, TestJudgement>
        {
            public TestHitRenderer(WorkingBeatmap beatmap, bool isForCurrentRuleset)
{'fraction_non_alphanumeric': 0.0931214303451701, 'fraction_numerical': 0.00893965731313633, 'mean_word_length': 2.2962356792144027, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5213079', 'n_tokens_mistral': 1197, 'n_tokens_neox': 1086, 'n_words': 260}