package org.teachingkidsprogramming.recipes.inDevelopment; public class HolidayCard { //**needs to be translated from the SmallBasic // Holiday Recipe - Enjoy! // Set the background to the color to Snow // // Make the tortoise move as fast as possible // // Tell the program window to call Click (recipe below) when the mouse is clicked // // // ------------- Recipe for Click // // If the left mouse button is down // // DrawTree(recipe below) // // Otherwise, // // DrawHappyHolidays(recipe below) // // ------------- End of Click recipe // // // ------------- Recipe for DrawHappyHolidays // // Play the music for Jingle Bells (Hint:"EEEP4EEEP4EGCDL1E") // // Set the font to be 48pt // // Set the font color to red // // Write the text "Happy Holidays" on the screen at position 150, 150 // // ------------- End of DrawMerryChristmas recipe // // ------------- Recipe for DrawTree // // DrawTreeTop(recipe below) // // DrawTreeBody(recipe below) // // DrawTreeTrunk(recipe below) // // ------------- End of DrawTree recipe // // // ------------- Recipe for DrawTreeTop // // The current distance is distance of the mouse from the center of the window // // The current length is a 20th of the current distance // // Change the X position of tortoise to where the mouse is // // Change the Y position of tortoise to where the mouse is // // Change the tortoise so that it is pointing straight down // // Change the color of the line the tortoise draws to forest green // // Change the width of the line to the current length divided by 5 // // Move the tortoise half the current length // // Hide the tortoise // // Turn the tortoise 90 degrees to the left // // Move the tortoise half of the current length // // ------------- End of DrawTreeTop recipe // // // ------------- Recipe for DrawTreeBody // // The current turn amount is 175 // // The current scale is 1.1 // // Do the following 11 times // // Turn the tortoise the current turn amount to the right // // Set the current length to the current length times the current scale // // Move the tortoise the current length // // Turn the tortoise the current turn amount to the left // // Set the current length to the current length times the current scale // // Move the tortoise the current length // // Decrease the current turn amount by 1 // // Repeat // ------------- End of DrawTreeBody recipe // // // ------------- Recipe for DrawTreeTrunk // // Turn the tortoise 180 degrees to the right // // Move the tortoise half of the current length // // Change the tortoise so that it is pointing straight down // // Change the width of the line to the current length divided by 10 // // Change the color of the line the tortoise draws to brown // // Move the tortoise a quarter the current length // // ------------- End of DrawTreeTrunk recipe }