public void StartProgram()
 {
     SnapsEngine.SetTitleString("Workout Time!");
     SnapsEngine.DisplayString("Jog in Place");
     SnapsEngine.SpeakString("start Jogging in Place");
     SnapsEngine.Delay(30);
     SnapsEngine.SpeakString("rest");
     SnapsEngine.Delay(10);
     SnapsEngine.DisplayString("Push-ups");
     SnapsEngine.SpeakString("start push ups");
     SnapsEngine.Delay(30);
     SnapsEngine.SpeakString("rest");
     SnapsEngine.Delay(10);
     SnapsEngine.DisplayString("Jumping Jacks");
     SnapsEngine.SpeakString("start Jumping jacks");
     SnapsEngine.Delay(30);
     SnapsEngine.SpeakString("rest");
     SnapsEngine.Delay(10);
     SnapsEngine.DisplayString("Squats");
     SnapsEngine.SpeakString("start squats");
     SnapsEngine.Delay(30);
     SnapsEngine.SpeakString("rest");
     SnapsEngine.Delay(10);
     SnapsEngine.DisplayString("Sit-ups");
     SnapsEngine.SpeakString("start sit ups");
     SnapsEngine.Delay(30);
     SnapsEngine.SpeakString("rest");
     SnapsEngine.Delay(10);
 }
Beispiel #2
0
    public void StartProgram()
    {
        SnapsEngine.SetTitleString("Countdown");
        SnapsEngine.DisplayString("Let the countdown begin! \n10");
        SnapsEngine.SpeakString("Let the countdown begin! Ten");
        SnapsEngine.DisplayString("Nine");
        SnapsEngine.SpeakString("Nine");
        SnapsEngine.DisplayString("Eight");
        SnapsEngine.SpeakString("Eight");
        SnapsEngine.DisplayString("Seven");
        SnapsEngine.SpeakString("Seven");
        SnapsEngine.DisplayString("Six");
        SnapsEngine.SpeakString("Six");
        SnapsEngine.DisplayString("Five");
        SnapsEngine.SpeakString("Five");
        SnapsEngine.DisplayString("Four");
        SnapsEngine.SpeakString("Four");
        SnapsEngine.DisplayString("Three");
        SnapsEngine.SpeakString("Three");
        SnapsEngine.DisplayString("Two");
        SnapsEngine.SpeakString("Two");
        SnapsEngine.DisplayString("One");
        SnapsEngine.SpeakString("One");
        SnapsEngine.DisplayString("Zero");
        SnapsEngine.SpeakString("Zero");

        SnapsEngine.SpeakString("Tick");
        SnapsEngine.Delay(.5);
        SnapsEngine.SpeakString("Tock");
    }
Beispiel #3
0
    public void StartProgram()
    {
        SnapsEngine.SetTitleString("How many vehicles passed?");

        bool   go = true;
        string picker;
        int    bikeCounter  = 0;
        int    carCounter   = 0;
        int    truckCounter = 0;
        int    vanCounter   = 0;



        while (go)
        {
            picker = SnapsEngine.SelectFrom5Buttons("Car", "Bike", "Van", "Truck", "Total");
            if (picker == "Bike")
            {
                bikeCounter = bikeCounter + 1;
            }

            if (picker == "Car")
            {
                carCounter = carCounter + 1;
            }

            if (picker == "Van")
            {
                vanCounter = vanCounter + 1;
            }

            if (picker == "Truck")
            {
                truckCounter = truckCounter + 1;
            }

            if (picker == "Total")
            {
                go = false;
                SnapsEngine.ClearTextDisplay();
                string van   = vanCounter.ToString();
                string bike  = bikeCounter.ToString();
                string truck = truckCounter.ToString();
                string car   = carCounter.ToString();

                SnapsEngine.DisplayString("There was" + " " + van + " " + "van(s)");
                SnapsEngine.Delay(3);
                SnapsEngine.DisplayString("There was" + " " + bike + " " + "bike(s)");
                SnapsEngine.Delay(3);
                SnapsEngine.DisplayString("There was" + " " + truck + " " + "truck(s)");
                SnapsEngine.Delay(3);
                SnapsEngine.DisplayString("There was" + " " + car + " " + "car(s)");
                SnapsEngine.Delay(4);
                int    sum    = vanCounter + bikeCounter + truckCounter + carCounter;
                string summer = sum.ToString();
                SnapsEngine.SpeakString("There was a total of" + summer + "vehicles");
                SnapsEngine.DisplayString("There was a total of" + " " + summer + " " + "vehicles");
            }
        }
    }
Beispiel #4
0
    public void StartProgram()
    {
        while (true)
        // run this until user exits program
        {
            SnapsEngine.SetTitleString("Tiny Contacts");
            SnapsEngine.Delay(3);
            // after the phrase Tiny Contacts is displayed. wait for three seconds


            string select = SnapsEngine.SelectFrom2Buttons("New Contact", "Find Contact");
            // two buttons appear named "New Contact" and "Find Contact" for user to click. Whichever button user clicks it is stored in the variable select

            if (select == "New Contact")
            // if user clicks on New Contact run the NewContact method.
            {
                NewContact();
                // shifts control to newContact method
            }

            else
            {
                // if the user clicks Find Contact run the FindContact method.
                FindContact();
                // shifts control to findContact method
            }
        }
    }
    public void StartProgram()
    {
        setupGame();

        while (true)
        {
            waitForGameStart();
            resetGame();
            while (true)
            {
                positionMessages();
                updateBall();
                updateGamepad();
                updateScoreDisplay();
                SnapsEngine.DrawGamePage();

                // If we have no lives left we break out of the game loop
                // and end the game
                if (lives == 0)
                {
                    break;
                }
            }

            // when we get here the game is over
            displayGameOver();

            SnapsEngine.Delay(10);
        }
    }
Beispiel #6
0
 public void StartProgram()
 {
     SnapsEngine.SetTitleString("Egg Timer");
     SnapsEngine.DisplayString("There are five minutes left");
     SnapsEngine.Delay(60);
     SnapsEngine.DisplayString("There are four minutes left");
     SnapsEngine.Delay(60);
     SnapsEngine.DisplayString("There are three minutes left");
     SnapsEngine.Delay(60);
     SnapsEngine.DisplayString("There are two minutes left");
     SnapsEngine.Delay(60);
     SnapsEngine.DisplayString("There is one minute left");
     SnapsEngine.Delay(50);
     SnapsEngine.SpeakString("Ten");
     SnapsEngine.SpeakString("Nine");
     SnapsEngine.SpeakString("Eight");
     SnapsEngine.SpeakString("Seven");
     SnapsEngine.SpeakString("Six");
     SnapsEngine.SpeakString("Five");
     SnapsEngine.SpeakString("Four");
     SnapsEngine.SpeakString("Three");
     SnapsEngine.SpeakString("Two");
     SnapsEngine.SpeakString("One");
     SnapsEngine.SpeakString("Your egg is ready. Eat up!");
 }
Beispiel #7
0
    public void StartProgram()
    {
        string name;

        SnapsEngine.SpeakString("Welcome");
        SnapsEngine.SetTitleString("Name one of the 5 most common names?");



        for (int i = 1; i <= 5;)
        {
            name = SnapsEngine.ReadString("What is your name?");

            if (name == "Jim" || name == "John" || name == "Bob" || name == "William" || name == "Paul")
            {
                SnapsEngine.SpeakString("That is one!");
                SnapsEngine.Delay(.5);
                SnapsEngine.SpeakString("Good job" + name + "is one of the most common names for men");

                break;
            }
            else
            {
                SnapsEngine.SpeakString("No thats not one!");
                i++;
            }
        }
    }
Beispiel #8
0
 public void StartProgram()
 {
     SnapsEngine.SetTitleString("Egg Timer");
     SnapsEngine.DisplayString("There are five minutes left");
     SnapsEngine.Delay(300);
     SnapsEngine.DisplayString("Your egg is done!");
 }
Beispiel #9
0
 void DisplayRoguesGallery()
 {
     foreach (MustachePicture d in rogueImages)
     {
         d.ShowStoredGraphics();
         SnapsEngine.Delay(.5);
     }
     SnapsEngine.ClearGraphics();
 }
Beispiel #10
0
 void DisplayDrawings()
 {
     foreach (Drawing d in drawings)
     {
         d.ShowStoredGraphics();
         SnapsEngine.Delay(.5);
     }
     SnapsEngine.ClearGraphics();
 }
Beispiel #11
0
    public void StartProgram()
    {
        int    tempInFahrenheit = 54;
        double tempInCentigrade = (tempInFahrenheit - 32) / 1.8;

        SnapsEngine.DisplayString("Fahreneheit: " + tempInFahrenheit);
        SnapsEngine.Delay(2);
        SnapsEngine.DisplayString("Centigrade: " + tempInCentigrade);
    }
Beispiel #12
0
        public void PlayNote(int pitch, double duration)
        {
            if (pitch < 0 || pitch >= noteNames.Length)
            {
                return;
            }

            StartPlayingSoundEffectatLocation(@"Sounds\MusicNotes\" + noteNames[pitch] + ".wav");
            SnapsEngine.Delay(duration);
        }
Beispiel #13
0
    void DisplayHelp()
    {
        SnapsEngine.SetTitleString("Drawing Diary");
        SnapsEngine.DisplayString("Touch the top left hand corner to display the menu");

        SnapsEngine.Delay(3);

        SnapsEngine.SetTitleString("");
        SnapsEngine.DisplayString("");
    }
Beispiel #14
0
    public void StartProgram()
    {
        SnapsEngine.DisplayImageFromUrl("https://st.hzcdn.com/simgs/1711fefa0603fedf_4-1809/industrial-novelty-signs.jpg"); // add background image of a diner sign
        SnapsEngine.SetTitleString("Car Counter");
        // variables that count the number of cars, vans, bikes, and trucks
        int car   = 0;
        int van   = 0;
        int bike  = 0;
        int truck = 0;


        bool button = true;

        // loop that allows user to keep clicking on different transportations until user wants sum.
        while (button == true)
        {
            // stores what user selects from the 5 buttons
            string pick = SnapsEngine.SelectFrom5Buttons("Car", "Van", "Bike", "Truck", "Sum");
            // adds one to whichever user picks
            if (pick == "Car")
            {
                car = car + 1;
            }
            if (pick == "Van")
            {
                van = van + 1;
            }
            if (pick == "Bike")
            {
                bike = bike + 1;
            }
            if (pick == "Truck")
            {
                truck = truck + 1;
            }
            if (pick == "Sum")
            {
                // if user picks sum text is cleared and then program gives user the amount of times he/she clicked on each transportation.
                SnapsEngine.ClearTextDisplay();
                SnapsEngine.AddLineToTextDisplay("There were " + car.ToString() + " cars");
                SnapsEngine.Delay(10);
                SnapsEngine.AddLineToTextDisplay("There were " + van.ToString() + " vans");
                SnapsEngine.Delay(10);
                SnapsEngine.AddLineToTextDisplay("There were " + bike.ToString() + " bikes");
                SnapsEngine.Delay(10);
                SnapsEngine.AddLineToTextDisplay("There were " + truck.ToString() + " trucks");
                SnapsEngine.Delay(10);
                // ends the ability to select transportations.
                button = false;
            }
            {
            }
        }
    }
Beispiel #15
0
    void DisplayHelp()
    {
        SnapsEngine.SetTitleString("Mustache Machine");
        SnapsEngine.DisplayString("Touch the top left hand corner to display the menu");

        SnapsEngine.Delay(3);

        SnapsEngine.SetTitleString("");
        SnapsEngine.DisplayString("");

        SnapsEngine.TakePhotograph();
    }
Beispiel #16
0
    public void StartProgram()
    {
        SnapsEngine.SetTitleString("Snaps Clock");

        while (true)
        {
            DateTime currentDateAndTime = DateTime.Now;

            SnapsEngine.DisplayString(currentDateAndTime.ToString());

            SnapsEngine.Delay(1);
        }
    }
Beispiel #17
0
    public void StartProgram()
    {
        SnapsEngine.SetTitleString("Snaps Clock");

        while (true)
        {
            DateTime currentDateAndTime = DateTime.Now;

            SnapsEngine.DisplayString(message: currentDateAndTime.ToString(),
                                      alignment: SnapsTextAlignment.centre,
                                      fadeType: SnapsFadeType.nofade,
                                      size: 50);

            SnapsEngine.Delay(1);
        }
    }
 public void StartProgram()
 {
     while (true)
     {
         SnapsEngine.SetTitleString("Afk Timer");
         SnapsEngine.Delay(3.0);
         SnapsEngine.SpeakString("Twenty minutes remaining");
         SnapsEngine.Delay(600.0);
         SnapsEngine.SpeakString("Ten minutes remaining");
         SnapsEngine.Delay(300.0);
         SnapsEngine.SpeakString("Five minutes remaining");
         SnapsEngine.Delay(240.0);
         SnapsEngine.SpeakString("One minute remaining");
         SnapsEngine.Delay(60.0);
         SnapsEngine.SpeakString("Timer resetting");
     }
 }
Beispiel #19
0
    public void StartProgram()
    {
        SnapsEngine.SetTitleString("Current Time");

        var time = true;


        while (time)
        {
            int    hourValue   = SnapsEngine.GetHourValue();
            int    minuteValue = SnapsEngine.GetMinuteValue();
            int    secondValue = SnapsEngine.GetSecondsValue();
            string currentTime = hourValue.ToString() + ":" + minuteValue.ToString() + ":" + secondValue.ToString();
            SnapsEngine.Delay(1);
            SnapsEngine.DisplayString(currentTime);
        }
    }
Beispiel #20
0
    public void StartProgram()
    {
        SnapsEngine.SetTitleString("Special message if you score on a dice roll within 3 tries.");
        SnapsEngine.Delay(3);
        SnapsEngine.DisplayString("6");
        int diceRoll = SnapsEngine.ThrowDice();


        for (int count = 0; count < 4; count++)
        {
            if (diceRoll == 6)
            {
                SnapsEngine.DisplayString(diceRoll.ToString());
                SnapsEngine.Delay(.5);
                SnapsEngine.SpeakString("Congratulations! You won the message!");
                SnapsEngine.Delay(2);
                SnapsEngine.SpeakString("The message is....");
                SnapsEngine.Delay(3);
                SnapsEngine.SpeakString("I don't really have a special message");
                break;
            }
            else
            {
                SnapsEngine.DisplayString(diceRoll.ToString());
                SnapsEngine.SpeakString(diceRoll.ToString());
                SnapsEngine.Delay(1);
                SnapsEngine.SpeakString("Nope not getting the message");
                SnapsEngine.Delay(1);
                count++;


                if (count < 4)
                {
                    SnapsEngine.SpeakString("Next dye roll");
                    diceRoll = SnapsEngine.ThrowDice();
                }
                else
                {
                    SnapsEngine.SpeakString("You suck ");
                }
            }
        }
    }
Beispiel #21
0
 public void StartProgram()
 {
     SnapsEngine.SetTitleString("Time to man up!");
     SnapsEngine.DisplayString("Five minutes to rock. Punch!!!!");
     SnapsEngine.Delay(30);
     SnapsEngine.DisplayString("Active rest!");
     SnapsEngine.Delay(90);
     SnapsEngine.DisplayString("Four minutes to live. Burpees!!!!");
     SnapsEngine.Delay(30);
     SnapsEngine.DisplayString("Active rest!");
     SnapsEngine.Delay(90);
     SnapsEngine.DisplayString("Three minutes of battle left. Knees!!!!");
     SnapsEngine.Delay(30);
     SnapsEngine.DisplayString("Active rest!");
     SnapsEngine.Delay(90);
     SnapsEngine.DisplayString("Two more minutes of fire. Get up and jump lunges!!!!");
     SnapsEngine.Delay(30);
     SnapsEngine.DisplayString("Active rest!");
     SnapsEngine.Delay(90);
     SnapsEngine.DisplayString("One more round. Burpees!!!!");
     SnapsEngine.Delay(30);
     SnapsEngine.DisplayString("You survived five minutes of hell");
 }
    public void StartProgram()
    {
        SnapsEngine.StartGameEngine(fullScreen: false, framesPerSecond: 60);

        ImageSprite ball = new ImageSprite(imageURL: "ms-appx:///Images/ball.png");

        SnapsEngine.AddSpriteToGame(ball);

        double ballWidth = SnapsEngine.GameViewportWidth / 20.0;

        ball.ScaleSpriteWidth(ballWidth);

        while (true)
        {
            ball.X = 0;
            ball.Y = 0;
            SnapsEngine.DrawGamePage();
            SnapsEngine.Delay(0.5);
            ball.X = 500;
            ball.Y = 500;
            SnapsEngine.DrawGamePage();
            SnapsEngine.Delay(0.5);
        }
    }
 public void StartProgram()
 {
     SnapsEngine.DisplayString("Blue Monday");
     SnapsEngine.Delay(2);
     SnapsEngine.SetTextColor(SnapsColor.Blue);
 }
 public static void StartProgram(int delay)
 {
     SnapsEngine.SpeakString("{0} minutes remaining", delay / 60);
     SnapsEngine.Delay(delay);
 }
Beispiel #25
0
    public void StartProgram()
    {
        SnapsEngine.SetTitleString("What kind of pizza?!");
        // variables that count pizza types
        int pepperoni = 0;
        int cheese    = 0;
        int beef      = 0;
        int supreme   = 0;
        // counter variable for loop
        int counter = 1;

        // loop around 4 times unless overview is clicked
        while (counter <= 4)
        {
            {
                // asks user to say favorite pizza or overview
                string toppingChoice = SnapsEngine.SelectFromFiveSpokenPhrases(prompt: "What's your favorite pizza?", phrase1: "Pepperoni", phrase2: "Cheese", phrase3: "Supreme", phrase4: "Beef", phrase5: "Overview");
                // adds one to whatever pizza user chose
                if (toppingChoice == "Pepperoni")
                {
                    pepperoni = pepperoni + 1;
                }
                if (toppingChoice == "Cheese")
                {
                    cheese = cheese + 1;
                }
                if (toppingChoice == "Beef")
                {
                    beef = beef + 1;
                }
                if (toppingChoice == "Supreme")
                {
                    supreme = supreme + 1;
                }

                // if user selects overview, it will display and say what choices he/she chose
                if (toppingChoice == "Overview")
                {
                    SnapsEngine.ClearTextDisplay();
                    SnapsEngine.SpeakString("There were " + pepperoni + " pepperoni pizzas");
                    SnapsEngine.AddLineToTextDisplay("There were " + pepperoni + " pepperoni pizzas");
                    SnapsEngine.Delay(3);
                    SnapsEngine.SpeakString("There were " + cheese + " cheese pizzas");
                    SnapsEngine.AddLineToTextDisplay("There were " + cheese + " cheese pizzas");
                    SnapsEngine.Delay(3);
                    SnapsEngine.SpeakString("There were " + beef + " beef pizzas");
                    SnapsEngine.AddLineToTextDisplay("There were " + beef + " beef pizzas");
                    SnapsEngine.Delay(3);
                    SnapsEngine.SpeakString("There were " + supreme + " supreme pizzas");
                    SnapsEngine.AddLineToTextDisplay("There were " + supreme + " supreme pizzas");
                    SnapsEngine.Delay(3);
                    // exits loop
                    break;
                }
                // if no logical selection has been chosen, alerts users of error and repeats the prompt
                else
                {
                    SnapsEngine.SpeakString("Sorry that is not a viable selection!");
                    continue;
                }


                counter = counter + 1;
            }
        }
        // if user says 4 pizza choices, this block runs. its an overview without clicking on it after max 4 choices
        SnapsEngine.ClearTextDisplay();
        SnapsEngine.SpeakString("There were " + pepperoni + " pepperoni pizzas");
        SnapsEngine.AddLineToTextDisplay("There were " + pepperoni + " pepperoni pizzas");
        SnapsEngine.Delay(3);
        SnapsEngine.SpeakString("There were " + cheese + " cheese pizzas");
        SnapsEngine.AddLineToTextDisplay("There were " + cheese + " cheese pizzas");
        SnapsEngine.Delay(3);
        SnapsEngine.SpeakString("There were " + beef + " beef pizzas");
        SnapsEngine.AddLineToTextDisplay("There were " + beef + " beef pizzas");
        SnapsEngine.Delay(3);
        SnapsEngine.SpeakString("There were " + supreme + " supreme pizzas");
        SnapsEngine.AddLineToTextDisplay("There were " + supreme + " supreme pizzas");
        SnapsEngine.Delay(3);
    }
Beispiel #26
0
 public void StartProgram()
 {
     SnapsEngine.DisplayString("Start");
     SnapsEngine.Delay(10);
     SnapsEngine.DisplayString("End");
 }