Example #1
0
        public SettingsPage()
        {
            InitializeComponent();
            InnerButtonClose.IsVisible = false;
            InnerButtonMenu.IsVisible  = true;

            ConnectOpenWithClick();
            ConnectCloseWithClick();
            ConnectWithClick();

            if (App.geometryInteractor.ColorForVisitedPolygon == Color.FromRgba(54, 138, 239, 100))
            {
                Blue.ScaleTo(1.3, 1);
            }
            else if (App.geometryInteractor.ColorForVisitedPolygon == Color.FromRgba(255, 214, 0, 100))
            {
                Yellow.ScaleTo(1.3, 1);
            }
            else if (App.geometryInteractor.ColorForVisitedPolygon == Color.FromRgba(255, 23, 68, 100))
            {
                Red.ScaleTo(1.3, 1);
            }
            else if (App.geometryInteractor.ColorForVisitedPolygon == Color.FromRgba(0, 200, 83, 100))
            {
                Green.ScaleTo(1.3, 1);
            }
        }
Example #2
0
 public bool Equals(Cmyk other)
 {
     return(Cyan.Equals(other.Cyan) &&
            Magenta.Equals(other.Magenta) &&
            Yellow.Equals(other.Yellow) &&
            Key.Equals(other.Key));
 }
Example #3
0
        private void richTextBox1_TextChanged(object sender, EventArgs e)
        {
            richTextBox2.Text = "";
            richTextBox1.SelectionAlignment = HorizontalAlignment.Left;

            for (int i = 1; i < richTextBox1.Lines.Length; i++)
            {
                richTextBox2.Text += i.ToString() + '\r' + '\n';
            }

            var currentSelStart  = richTextBox1.SelectionStart;
            var currentSelLength = richTextBox1.SelectionLength;

            richTextBox1.SelectAll();
            richTextBox1.SelectionColor = SystemColors.WindowText;


            bluend blue_obj   = new bluend();
            Yellow yellow_obj = new Yellow();
            Orange orange_obj = new Orange();

            blue_obj.check(richTextBox1);
            yellow_obj.check(richTextBox1);
            orange_obj.check(richTextBox1);


            richTextBox1.Select(currentSelStart, currentSelLength);
            richTextBox1.SelectionColor = SystemColors.WindowText;
        }
Example #4
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
 }
Example #5
0
    public static void Start()
    {
        Yellow[] gbs = MultiThread.MakeThreads <Yellow>(8, "baseSaves/yellow_moon_backup.sav");
        Yellow   gb  = gbs[0];

        gb.Show();
        new RbyIntroSequence().Execute(gb);

        RbyMap map1 = gb.Maps[60];
        RbyMap map2 = gb.Maps[61];

        Pathfinding.GenerateEdges <RbyMap, RbyTile>(gb, 0, map2[12, 9], Action.Up | Action.Down | Action.Left | Action.Right | Action.A);

        map1[21, 16].GetEdge(0, Action.Down).NextTile  = map2[21, 17];
        map1[20, 17].GetEdge(0, Action.Right).NextTile = map2[21, 17];

        for (int x = 0xd; x <= 0x12; x++)
        {
            for (int y = 0x10; y <= 0x11; y++)
            {
                map1[x, y].RemoveEdge(0, Action.A);
                map1[x, y].RemoveEdge(0, Action.Down);
            }
        }

        for (int x = 0xd; x <= 0x12; x++)
        {
            for (int y = 0x10; y <= 0x11; y++)
            {
                map1[x, y].RemoveEdge(0, Action.A);
                map1[x, y].RemoveEdge(0, Action.Down);
            }
        }

        for (int x = 0x11; x <= 0x17; x++)
        {
            map2[x, 0x1f].RemoveEdge(0, Action.A);
        }

        IGTResults initialState = Yellow.IGTCheckParallel(gbs, new RbyIntroSequence(), 60);

        StreamWriter writer = new StreamWriter("moon.txt");

        writer.AutoFlush = true;

        DFParameters <Yellow, RbyMap, RbyTile> parameters = new DFParameters <Yellow, RbyMap, RbyTile>()
        {
            PruneAlreadySeenStates = true,
            MaxCost       = 20,
            NoEncounterSS = 60,
            RNGSS         = 56,
            EndTiles      = new RbyTile[] { map2[12, 9], },
            FoundCallback = state => writer.WriteLine(state.Log),
            EndEdgeSet    = 0,
        };

        DepthFirstSearch.StartSearch(gbs, parameters, gb.Tile, 0, initialState);
    }
 public void Display()
 {
     Console.WriteLine(CardNumber + ", " + FlavorText);
     Console.WriteLine(Strain);
     Console.WriteLine("Red    : " + Red.ToString());
     Console.WriteLine("Orange : " + Orange.ToString());
     Console.WriteLine("Yellow : " + Yellow.ToString());
     Console.WriteLine("Blue   : " + Blue.ToString());
 }
Example #7
0
 public FoodFacade()
 {
     bananaCandy = new BananaCandy();
     bigCandy    = new BigCandy();
     smallCandy  = new SmallCandy();
     cherryCandy = new CherryCandy();
     yellow      = new Yellow();
     red         = new Red();
 }
Example #8
0
 protected override void OnPaint(PaintEventArgs e) //vykreslovanie mapy
 {
     base.OnPaint(e);
     DrawMap(e.Graphics);          //vykresli sa mapa
     pacman.DrawPM(e.Graphics);    //vykresleny pacman
     Red.DrawGhost(e.Graphics);    //vykresleny cerveny duch
     Yellow.DrawGhost(e.Graphics); //vykresleny zlty duch
     Pink.DrawGhost(e.Graphics);   //vykresleny ruzovy duch
 }
 public void AutoMoveYellowForSix()
 {
     foreach (YellowPlayerScript Yellow in mYellowPlayers)
     {
         if (Yellow.mTokenOut == true && GameManagerScript.mGameManager.mYellowPlayerFinished == 3)
         {
             Yellow.StartTokenMovement();
         }
     }
 }
Example #10
0
 public override string ToString()
 {
     return(String.Format("C={0}, M={1}, Y={2}, K={3}", new string[]
     {
         Cyan.ToString(),
         Magenta.ToString(),
         Yellow.ToString(),
         Black.ToString(),
     }));
 }
    public static void Main(string[] args)
    {
        Background background = new Background();

        Color yellow = new Yellow("color yellow");
        Color blue   = new Blue("color blue");
        Color red    = new Red("color red");

        background.setBackground(yellow);
        background.setBackground(blue);
        background.setBackground(red);
    }
Example #12
0
    public void ShowCurrentTurn(PawnColor turn, string name)
    {
        //HideDiceImage ();
        rolledDiceNumber.gameObject.SetActive(false);
        switch (turn)
        {
        case PawnColor.c_Blue:
            showTurn.text  = (name == null || name == "") ? "Blues Turn" : name + "'s Turn";
            showTurn.color = blue;
            Blue.ShowSelectableAnimation();
            Red.StopSelectableAnimation();
            Yellow.StopSelectableAnimation();
            Green.StopSelectableAnimation();
            //diceValImage.GetComponent<Image> ().color = Color.blue;
            rolledDiceNumber.color = Color.blue;
            break;

        case PawnColor.c_Red:
            showTurn.text  = (name == null || name == "") ? "Reds Turn" : name + "'s Turn";
            showTurn.color = red;
            Blue.StopSelectableAnimation();
            Red.ShowSelectableAnimation();
            Yellow.StopSelectableAnimation();
            Green.StopSelectableAnimation();
            //diceValImage.GetComponent<Image> ().color = Color.red;
            rolledDiceNumber.color = Color.red;
            break;

        case PawnColor.c_Yellow:
            showTurn.text  = (name == null || name == "") ? "Yellows Turn" : name + "'s Turn";
            showTurn.color = yellow;
            Blue.StopSelectableAnimation();
            Red.StopSelectableAnimation();
            Yellow.ShowSelectableAnimation();
            Green.StopSelectableAnimation();
            //diceValImage.GetComponent<Image> ().color = Color.yellow;
            rolledDiceNumber.color = Color.yellow;
            break;

        case PawnColor.c_Green:
            showTurn.text  = (name == null || name == "") ? "Greens Turn" : name + "'s Turn";
            showTurn.color = green;
            Blue.StopSelectableAnimation();
            Red.StopSelectableAnimation();
            Yellow.StopSelectableAnimation();
            Green.ShowSelectableAnimation();
            //diceValImage.GetComponent<Image> ().color = Color.green;
            rolledDiceNumber.color = Color.green;
            break;
        }

        turnColorIndicator.color = rolledDiceNumber.color;
    }
Example #13
0
 private void Start_Click(object sender, EventArgs e)
 {
     Start.Visible   = false;
     label11.Visible = false;
     santat.Start();
     Final.Start();
     Backround_tick.Start();
     Red.Start();
     Yellow.Start();
     meida.URL = txt.Text;
     meida.Ctlcontrols.play();
 }
    public static void Main(string[] args){

        Background background = new Background();

        Color yellow = new Yellow("color yellow");
        Color blue = new Blue("color blue");
        Color red = new Red("color red");

        background.setBackground(yellow);
        background.setBackground(blue);
        background.setBackground(red);
    }
Example #15
0
        void SimonSequence_Tick(object sender, EventArgs e)
        {
            fire7_wav.IsMuted   = false;
            ice03_wav.IsMuted   = false;
            bolt06_wav.IsMuted  = false;
            earth04_wav.IsMuted = false;

            if (sequence[SimonIndex] == 3)
            {
                Yellow.Begin();
            }
            if (sequence[SimonIndex] == 2)
            {
                Green.Begin();
            }
            if (sequence[SimonIndex] == 1)
            {
                Red.Begin();
            }
            if (sequence[SimonIndex] == 0)
            {
                Blue.Begin();
            }

            SimonIndex++;
            if (SimonIndex == maxIndex + 1)
            {
                SimonSequence.Stop();
                CanPlay = true;
                msg.Stop();
                MSG.Text     = "GIVE IT A GO!";
                secRemaining = TimerMax;
                timetxt.Text = secRemaining.ToString();
                Timer.Start();
                if (this.game.Difficulty == SimonSaysDifficulty.Hard)
                {
                    //if (TimerDifficulty == 3)
                    tickHard.Begin();
                }
                if (this.game.Difficulty == SimonSaysDifficulty.Normal)
                {
                    //if (TimerDifficulty == 2)
                    tickMedium.Begin();
                }
                if (this.game.Difficulty == SimonSaysDifficulty.Ease)
                {
                    //if (TimerDifficulty == 1)
                    tickEasy.Begin();
                }
            }
        }
Example #16
0
        /// <summary>
        /// Prints all built-in styles for quick browsing.
        /// </summary>
        public static void PrintDemo()
        {
            NewPara();

            Write("Standard:   ")
            .Red.Write("Red").Default.Write("         ")
            .Green.Write("Green").Default.Write("    ")
            .Blue.Write("Blue").Default.Write("        ")
            .Cyan.Write("Cyan").Default.Write("          ")
            .Yellow.Write("Yellow").Default.Write("        ")
            .Gold.Write("Gold").Default.Write("      ")
            .Muted.Write("Muted").Default.Write("    ")
            .Bright.WriteLine("Bright");

            Write("Messaging:  ")
            .Error.Write("Error").Default.Write("       ")
            .OK.Write("OK").Default.Write("       ")
            .Warning.Write("Warning").Default.Write("     ")
            .Tag.Write("Tag").Default.Write("           ")
            .Note.Write("Note").Default.Write("          ")
            .Tip.Write("Tip").Default.Write("       ")
            .Label.Write("Label").Default.Write("    ")
            .Terminal.WriteLine("Terminal");

            Write("Extended:   ")
            .Graphite.Write("Graphite").Default.Write("    ")
            .Azure.Write("Azure").Default.Write("    ")
            .Eggplant.Write("Eggplant").Default.Write("    ")
            .Strawberry.Write("Strawberry").Default.Write("    ")
            .Watermelon.Write("Watermelon").Default.Write("    ")
            .Squash.Write("Squash").Default.Write("    ")
            .Lime.Write("Lime").Default.Write("     ")
            .Tomato.WriteLine("Tomato");

            NewPara();

            Console.WriteLine("Standard:\tMessaging:\tExtended:");
            Red.Write("Red\t\t").Error.Write("Error\t\t").Graphite.WriteLine("Graphite");
            Green.Write("Green\t\t").OK.Write("OK\t\t").Azure.WriteLine("Azure");
            Blue.Write("Blue\t\t").Warning.Write("Warning\t\t").Eggplant.WriteLine("Eggplant");
            Cyan.Write("Cyan\t\t").Tag.Write("Tag\t\t").Strawberry.WriteLine("Strawberry");
            Yellow.Write("Yellow\t\t").Tip.Write("Tip\t\t").Squash.WriteLine("Squash");
            Gold.Write("Gold\t\t").Note.Write("Note\t\t").Watermelon.WriteLine("Watermelon");
            Muted.Write("Muted\t\t").Label.Write("Label\t\t").Lime.WriteLine("Lime");
            Bright.Write("Bright\t\t").Terminal.Write("Terminal\t").Tomato.WriteLine("Tomato");

            NewPara();
        }
Example #17
0
        public async Task ParallelQuickSort()
        {
            var qs = new ParallelQuickSorter <int>();

            var tasks = new Task <TimeSpan> [5];

            for (int j = 0; j < tasks.Length; j++)
            {
                tasks[j] = Task.Run(() => QuickSortRoutine(qs));
            }

            await Task.WhenAll(tasks);

            Yellow.WriteLine(
                $"Average time is {new TimeSpan(Convert.ToInt64(tasks.Average(task => task.Result.Ticks)))}\n");
        }
Example #18
0
        protected virtual void ChangeLight(byte state)
        {
            K8055N.SetCurrentDevice(Card); // Spojení se správnou kartou

            // 0 => Stát      (Červená)         -> dlouhý interval
            // 1 => Jeď       (Zelená)          -> dlouhý interval
            // 2 => Připravit (Červená + Žlutá) -> krátký interval
            // 3 => Pozor     (Žlutá)           -> krátký interval
            // 4 => Servis    (= OFF)           -> krátký interval
            switch (state)
            {
            case 0:
                Red?.SetBit();
                Yellow?.ClearBit();
                Green?.ClearBit();
                break;

            case 1:
                Red?.ClearBit();
                Yellow?.ClearBit();
                Green?.SetBit();
                break;

            case 2:
                Red?.SetBit();
                Yellow?.SetBit();
                Green?.ClearBit();
                break;

            case 3:
                Red?.ClearBit();
                Yellow?.SetBit();
                Green?.ClearBit();
                break;

            case 4:
                Red?.ClearBit();
                Yellow?.ClearBit();
                Green?.ClearBit();
                break;
            }
        }
Example #19
0
    private IEnumerator starPollingGetTeamsCreated()
    {
        while (true)
        {
            StartCoroutine(GetTeamsCreated());

            // dito i active yung mga button teams
            if (ListOfTeams.TeamList.Count > 0)
            {
                if ((ListOfTeams.TeamList.Where(t => t.teamColorId.Equals(1)).Select(t => t.teamColorId).FirstOrDefault() == 1) && !Blue.activeInHierarchy)
                {
                    Blue.SetActive(true); BlueText.text = ListOfTeams.TeamList.Where(t => t.teamColorId.Equals(1)).Select(t => t.teamName).FirstOrDefault();
                    //Blue.transform.SetSiblingIndex(ListOfTeams.TeamList.Count - 1);
                    CreateBlue.enabled = false;
                    CreateBlue.gameObject.SetActive(false);
                }
                if (ListOfTeams.TeamList.Where(t => t.teamColorId.Equals(2)).Select(t => t.teamColorId).FirstOrDefault() == 2 && !Red.activeInHierarchy)
                {
                    Red.SetActive(true); RedText.text = ListOfTeams.TeamList.Where(t => t.teamColorId.Equals(2)).Select(t => t.teamName).FirstOrDefault();
                    // Red.transform.SetSiblingIndex(ListOfTeams.TeamList.Count - 1);
                    CreateRed.enabled = false;
                    CreateRed.gameObject.SetActive(false);
                }
                if (ListOfTeams.TeamList.Where(t => t.teamColorId.Equals(3)).Select(t => t.teamColorId).FirstOrDefault() == 3 && !Green.activeInHierarchy)
                {
                    Green.SetActive(true); GreenText.text = ListOfTeams.TeamList.Where(t => t.teamColorId.Equals(3)).Select(t => t.teamName).FirstOrDefault();
                    //Green.transform.SetSiblingIndex(ListOfTeams.TeamList.Count - 1);
                    CreateGreen.enabled = false;
                    CreateGreen.gameObject.SetActive(false);
                }
                if (ListOfTeams.TeamList.Where(t => t.teamColorId.Equals(4)).Select(t => t.teamColorId).FirstOrDefault() == 4 && !Yellow.activeInHierarchy)
                {
                    Yellow.SetActive(true); YellowText.text = ListOfTeams.TeamList.Where(t => t.teamColorId.Equals(4)).Select(t => t.teamName).FirstOrDefault();
                    //Yellow.transform.SetSiblingIndex(ListOfTeams.TeamList.Count - 1);
                    CreateYellow.enabled = false;
                    CreateYellow.gameObject.SetActive(false);
                }
            }
            yield return(new WaitForSeconds(0.5f));
        }
    }
Example #20
0
 void OnTriggerEnter(Collider other)
 {
     if (!other.gameObject.CompareTag("restart"))
     {
         Debug.Log("Se ha tomado la carta color " + other.gameObject.name);
         obtained.Add(other.gameObject.name);
     }
     other.gameObject.SetActive(false);
     if (other.gameObject.CompareTag("restart"))
     {
         buttons.SetActive(true);
         Yellow.SetActive(true);
         Red.SetActive(true);
         Green.SetActive(true);
         Black.SetActive(true);
         Blue.SetActive(true);
         obtained.Clear();
         text = "";
         //set random card again
     }
 }
Example #21
0
        public async Task TestParallelQuickSort()
        {
            var qs = new ParallelQuickSorter <int>();

            for (int i = 70; i <= 100; i += 10)
            {
                Console.WriteLine($"InsertionBound = {i}");

                var tasks = new Task <TimeSpan> [5];

                for (int j = 0; j < 5; j++)
                {
                    tasks[j] = Task.Run(() => QuickSortRoutine(qs));
                }

                await Task.WhenAll(tasks);

                Yellow.WriteLine(
                    $"Average time is {new TimeSpan(Convert.ToInt64(tasks.Average(task => task.Result.Ticks)))}\n");
            }
        }
Example #22
0
    public void UpdateScore(CapsuleObject.Belong_State team)
    {
        switch (team)
        {
        case CapsuleObject.Belong_State.Red:
            Red.AddScore();
            break;

        case CapsuleObject.Belong_State.Green:
            Green.AddScore();
            break;


        case CapsuleObject.Belong_State.Blue:
            Blue.AddScore();
            break;

        case CapsuleObject.Belong_State.Yellow:
            Yellow.AddScore();
            break;
        }
    }
Example #23
0
 void Update()
 {
     if (Input.GetButtonDown("Red"))
     {
         cameraPos.position = Vector3.Lerp(cameraPos.position, redPos.position, 10);
         Yellow.GetComponent <YellowController>().yellowInPlay = false;
         Green.GetComponent <GreenController>().greenInPlay    = false;
         Blue.GetComponent <BlueController>().blueInPlay       = false;
         Red.GetComponent <RedController>().redInPlay          = true;
     }
     if (Input.GetButtonDown("Yellow"))
     {
         cameraPos.position = Vector3.Lerp(cameraPos.position, yellowPos.position, 10);
         Yellow.GetComponent <YellowController>().yellowInPlay = true;
         Green.GetComponent <GreenController>().greenInPlay    = false;
         Blue.GetComponent <BlueController>().blueInPlay       = false;
         Red.GetComponent <RedController>().redInPlay          = false;
     }
     if (Input.GetButtonDown("Green"))
     {
         cameraPos.position = Vector3.Lerp(cameraPos.position, greenPos.position, 10);
         Yellow.GetComponent <YellowController>().yellowInPlay = false;
         Green.GetComponent <GreenController>().greenInPlay    = true;
         Blue.GetComponent <BlueController>().blueInPlay       = false;
         Red.GetComponent <RedController>().redInPlay          = false;
     }
     if (Input.GetButtonDown("Blue"))
     {
         cameraPos.position = Vector3.Lerp(cameraPos.position, bluePos.position, 10);
         Yellow.GetComponent <YellowController>().yellowInPlay = false;
         Green.GetComponent <GreenController>().greenInPlay    = false;
         Blue.GetComponent <BlueController>().blueInPlay       = true;
         Red.GetComponent <RedController>().redInPlay          = false;
     }
     if (Input.GetKeyDown(KeyCode.R))
     {
         SceneManager.LoadScene("SampleScene");
     }
 }
Example #24
0
    public void DecreaseScore(CapsuleObject.Belong_State team)
    {
        switch (team)
        {
        case CapsuleObject.Belong_State.Red:
            Red.SubScore();
            break;

        case CapsuleObject.Belong_State.Green:
            Green.SubScore();
            break;


        case CapsuleObject.Belong_State.Blue:
            Blue.SubScore();
            break;

        case CapsuleObject.Belong_State.Yellow:
            Yellow.SubScore();
            break;
        }
    }
Example #25
0
        async void ColorButtonClicked(object sender, System.EventArgs e)
        {
            Blue.ScaleTo(1, 1);
            Yellow.ScaleTo(1, 1);
            Red.ScaleTo(1, 1);
            Green.ScaleTo(1, 1);

            Blue.WidthRequest    = 80;
            Blue.HeightRequest   = 80;
            Yellow.WidthRequest  = 80;
            Yellow.HeightRequest = 80;
            Red.WidthRequest     = 80;
            Red.HeightRequest    = 80;
            Green.WidthRequest   = 80;
            Green.HeightRequest  = 80;

            Button colorButton = (Button)sender;
            await colorButton.ScaleTo(1.3, 500);

            if (colorButton.Text == "Blue")
            {
                App.geometryInteractor.ColorForVisitedPolygon = Color.FromRgba(54, 138, 239, 100);
            }
            else if (colorButton.Text == "Yellow")
            {
                App.geometryInteractor.ColorForVisitedPolygon = Color.FromRgba(255, 214, 0, 100);
            }
            else if (colorButton.Text == "Red")
            {
                App.geometryInteractor.ColorForVisitedPolygon = Color.FromRgba(255, 23, 68, 100);
            }
            else if (colorButton.Text == "Green")
            {
                App.geometryInteractor.ColorForVisitedPolygon = Color.FromRgba(0, 200, 83, 100);
            }
        }
Example #26
0
    /// <summary>
    /// Verbindungen herstellen
    ///
    /// Die GameObjects, die die drei Leuchten der Ampel
    /// ausgeben werden als eine Hierarchie erwartet.
    /// Die Wurzel heißt "Ampel", und die drei Leuchten
    /// wie zu erwarten "Rot", "Gelb" und "Grün". Sie werden
    /// mit <code>GameObject.Find</code> mit ihrem Namen, z.b.
    /// "Ampel/Rot", abgefragt.
    /// </summary>
    private void Awake()
    {
        // Das Subject erzeugen und die View-Klasse registrieren
        Model = new TrafficLight(TimeForStop, TimeForWait,
                                 TimeForGo, TimeForAttention,
                                 StateStop.Instance,
                                 LogOutput);
        Model.Attach(this);

        // Wir suchen nach GameObjects mit den Namen
        // Rot, Gelb, Grün, die Kinder des GameObjects
        // mit dem Namen Ampel.
        Red    = GameObject.Find("Ampel/Rot");
        Yellow = GameObject.Find("Ampel/Gelb");
        Green  = GameObject.Find("Ampel/Grün");

        // Materialkomponenten dieser GameObjects abfragen
        RedMaterial    = Red.GetComponent <Renderer>().material;
        YellowMaterial = Yellow.GetComponent <Renderer>().material;
        GreenMaterial  = Green.GetComponent <Renderer>().material;

        // Materialien aus den Resourcen laden
        TrafficColors();
    }
Example #27
0
 public void Draw(Yellow c)
 {
     Turtle.SetColor(c.Value.R, c.Value.G, c.Value.B);
 }
Example #28
0
 /// <summary>
 /// Plays the role of a hash function of a certain type.
 /// </summary>
 /// <returns>Integer number</returns>
 public override int GetHashCode()
 {
     return(Red.GetHashCode() ^ Yellow.GetHashCode() ^ Blue.GetHashCode());
 }
Example #29
0
    public static void TIDManips()
    {
        Dictionary <RbyIntroSequence, ushort> redIntros = new Dictionary <RbyIntroSequence, ushort>()
        {
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0xA7CB },
            { new RbyIntroSequence(RbyStrat.Pal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0xB5B8 },
            { new RbyIntroSequence(RbyStrat.NoPalAB, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0x88E9 },
            { new RbyIntroSequence(RbyStrat.PalHold, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0x9BD5 },
            { new RbyIntroSequence(RbyStrat.PalAB, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0x91E1 },
            { new RbyIntroSequence(RbyStrat.PalRel, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0xABC0 },

            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfWait, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0x25B3 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfReset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0x856F },

            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop1, RbyStrat.Title0, RbyStrat.NewGame), 0x4B9C },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop2, RbyStrat.Title0, RbyStrat.NewGame), 0xEC47 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop3, RbyStrat.Title0, RbyStrat.NewGame), 0x56B1 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop4, RbyStrat.Title0, RbyStrat.NewGame), 0x687A },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop5, RbyStrat.Title0, RbyStrat.NewGame), 0x7656 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop6, RbyStrat.Title0, RbyStrat.NewGame), 0x97C7 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfWait, RbyStrat.Hop0Reset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0x4D0B },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop1Reset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0xD2BF },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop2Reset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0xEBED },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop3Reset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0x4260 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop4Reset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0xD965 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop5Reset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0x0C0D },

            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title1, RbyStrat.NewGame), 0xBC9B },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title2, RbyStrat.NewGame), 0xDDAC },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title3, RbyStrat.NewGame), 0xE4BC },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title4, RbyStrat.NewGame), 0x2FA8 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title5, RbyStrat.NewGame), 0x0747 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title6, RbyStrat.NewGame), 0x1542 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title7, RbyStrat.NewGame), 0x664B },

            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0Scroll, RbyStrat.NewGame), 0xF93E },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title1Scroll, RbyStrat.NewGame), 0x32F9 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title2Scroll, RbyStrat.NewGame), 0x7FD5 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title3Scroll, RbyStrat.NewGame), 0x1642 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title4Scroll, RbyStrat.NewGame), 0x227A },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title5Scroll, RbyStrat.NewGame), 0x8490 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title6Scroll, RbyStrat.NewGame), 0xAA83 },

            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0Reset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0x35A7 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title1Reset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0x1948 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title2Reset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0x0018 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title3Reset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0xCB0B },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title4Reset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0x8858 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title5Reset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0xAD4F },

            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0Usb, RbyStrat.CsReset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0x7BAB },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title1Usb, RbyStrat.CsReset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0x763F },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title2Usb, RbyStrat.CsReset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0xE79F },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title3Usb, RbyStrat.CsReset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0xF656 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title4Usb, RbyStrat.CsReset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0x858F },

            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.Backout, RbyStrat.Title0, RbyStrat.NewGame), 0x0AEE },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.Options, RbyStrat.NewGame), 0x9B10 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.Options, RbyStrat.Options, RbyStrat.NewGame), 0xBE2C },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.OptionsReset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0xC880 },

            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGameReset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0x5638 },
            { new RbyIntroSequence(RbyStrat.NoPal, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame, RbyStrat.OakReset, RbyStrat.GfSkip, RbyStrat.Hop0, RbyStrat.Title0, RbyStrat.NewGame), 0x67C6 },

            { new RbyIntroSequence("red_nopal_gfskip_hop0_title0_backout_title0_backout_title0_backout_title0_backout_title0_backout_title0_backout_title0_backout_title0_opt(backout)_newgame"), 0xFC7D },
            { new RbyIntroSequence("red_nopal_gfreset_gfreset_gfreset_gfreset_gfreset_gfskip_hop0_title0_newgame"), 0x0715 },
            { new RbyIntroSequence("red_pal(ab)_gfskip_hop0_title0_backout_title0_ngreset_gfskip_hop0_title0_newgame"), 0x3399 },
        };

        Dictionary <RbyIntroSequence, ushort> yellowIntros = new Dictionary <RbyIntroSequence, ushort>()
        {
            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.Intro0, RbyStrat.Title, RbyStrat.NewGame), 0x046E },
            { new RbyIntroSequence(RbyStrat.GfWait, RbyStrat.Intro0, RbyStrat.Title, RbyStrat.NewGame), 0xB535 },

            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.Intro1, RbyStrat.Title, RbyStrat.NewGame), 0x4261 },
            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.Intro2, RbyStrat.Title, RbyStrat.NewGame), 0x1FCC },
            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.Intro3, RbyStrat.Title, RbyStrat.NewGame), 0xD3C3 },
            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.Intro4, RbyStrat.Title, RbyStrat.NewGame), 0x6B98 },
            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.Intro5, RbyStrat.Title, RbyStrat.NewGame), 0xE5F1 },
            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.Intro6, RbyStrat.Title, RbyStrat.NewGame), 0xD82A },
            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.IntroWait, RbyStrat.Title, RbyStrat.NewGame), 0xE24E },

            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.Intro0Reset, RbyStrat.GfSkip, RbyStrat.Intro0, RbyStrat.Title, RbyStrat.NewGame), 0x012D },
            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.Intro1Reset, RbyStrat.GfSkip, RbyStrat.Intro0, RbyStrat.Title, RbyStrat.NewGame), 0x9127 },
            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.Intro2Reset, RbyStrat.GfSkip, RbyStrat.Intro0, RbyStrat.Title, RbyStrat.NewGame), 0xD98B },
            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.Intro3Reset, RbyStrat.GfSkip, RbyStrat.Intro0, RbyStrat.Title, RbyStrat.NewGame), 0x4025 },
            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.Intro4Reset, RbyStrat.GfSkip, RbyStrat.Intro0, RbyStrat.Title, RbyStrat.NewGame), 0xC78E },
            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.Intro5Reset, RbyStrat.GfSkip, RbyStrat.Intro0, RbyStrat.Title, RbyStrat.NewGame), 0x9CD3 },
            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.Intro6Reset, RbyStrat.GfSkip, RbyStrat.Intro0, RbyStrat.Title, RbyStrat.NewGame), 0x3ECC },

            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.Intro0, RbyStrat.TitleReset, RbyStrat.GfSkip, RbyStrat.Intro0, RbyStrat.Title, RbyStrat.NewGame), 0x62CC },
            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.Intro0, RbyStrat.TitleUsb, RbyStrat.CsReset, RbyStrat.GfSkip, RbyStrat.Intro0, RbyStrat.Title, RbyStrat.NewGame), 0xC7D4 },

            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.Intro0, RbyStrat.Title, RbyStrat.Backout, RbyStrat.Title, RbyStrat.NewGame), 0xF22B },
            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.Intro0, RbyStrat.Title, RbyStrat.NewGameReset, RbyStrat.GfSkip, RbyStrat.Intro0, RbyStrat.Title, RbyStrat.NewGame), 0x8398 },
            { new RbyIntroSequence(RbyStrat.GfSkip, RbyStrat.Intro0, RbyStrat.Title, RbyStrat.NewGame, RbyStrat.OakReset, RbyStrat.GfSkip, RbyStrat.Intro0, RbyStrat.Title, RbyStrat.NewGame), 0x6B9B },

            { new RbyIntroSequence("yellow_gfskip_intro0_title_backout_title_backout_title_backout_title_backout_title_backout_title_backout_title_backout_title_backout_title_backout_title_backout_title_backout_title_newgame"), 0x3BB9 },
            { new RbyIntroSequence("yellow_gfreset_gfreset_gfreset_gfreset_gfreset_gfreset_gfreset_gfskip_intro0_title_newgame"), 0xCF68 },
            { new RbyIntroSequence("yellow_gfreset_gfreset_gfskip_intro0_title_ngreset_gfskip_intro0_title_ngreset_gfskip_intro0_title_ngreset_gfskip_intro0_title_newgame"), 0xD457 },
        };

        Red    red    = new Red();
        Yellow yellow = new Yellow();

        TestIntros(red, "red", redIntros);
        TestIntros(yellow, "yellow", yellowIntros);

        void TestIntros(Rby gb, string gameName, Dictionary <RbyIntroSequence, ushort> intros)
        {
            foreach (var i in intros)
            {
                RbyIntroSequence intro       = i.Key;
                ushort           expectedTid = i.Value;
                Test(gameName + "_" + intro.ToString(), () => {
                    intro.Execute(gb);
                    gb.RunUntil("PrintLetterDelay");
                    ushort readTid = gb.CpuReadBE <ushort>("wPlayerID");
                    return(string.Format("${0:x4}", expectedTid), string.Format("${0:x4}", readTid));
                });
            }
Example #30
0
 /// <summary>
 /// Returns a System.String object that represents the current object.
 /// </summary>
 /// <returns>Text as a sequence of Unicode characters</returns>
 public override string ToString()
 {
     return(Red.ToString() + "\n" + Yellow.ToString() + "\n" + Blue.ToString());
 }
Example #31
0
 public override int GetHashCode()
 {
     return(Cyan.GetHashCode() ^ Magenta.GetHashCode() ^ Yellow.GetHashCode() ^ Black.GetHashCode());
 }
 private void Yellow_pressed(object sender, TappedRoutedEventArgs e)
 {
     Yellow.Play();
 }