Computer+Science

=Unit 1--How Do I make games using TouchDevelop? What makes them fun?= The "Big" Questions? What makes a game fun? What are different genres for games? What is a "computer program"? What is an "algorithm"? What types of problems are easy or hard for a computer to solve? What is the coordinate system in computer games and how is it used?

U1-Lesson 1--"What is a computer program?"
Objectives (SWBAT):
 * Follow a TouchDevelop tutorial
 * Explain the rules, goals, and structure of the //Jetpack Jumper Complete// game

A. What is a computer program? Discuss with your desk partner and come up with a definition (5 min)

B. Complete the Coding Jetpack Jumper tutorial. Click on the link below. (25 min) [|Coding Jetpack Jumper Tutorial] **Important note-- be sure to open the tutorial in "coder" mode, not "beginner", or "expert". Use your headphones or earbuds.

C. Reflection: In the Lesson 1 discussion link, answer these questions: 1. What did you learn in this tutorial? 2. What was the most interesting or fun part? 3. Did you have any problems? How did you solve them? 4. What else would you like to learn how to do in touchdevelop?

D. Analyze the rules, goals, and structure of //Jetpack Jumper Complete//. (10 min) Click on the link below: [|Jetpack Jumper Complete game] Work with a partner and take turns play the // Jetpack Jumper Complete // game. Observe your partner as they play and think about the rules, goals, and structure of the game. When time is called, work with your partner to create a list of steps and processes in the game. You may save these on a word document in your My Documents folder on your network drive.

Extra Opportunities:

1. Customize Jetpack Jumper game. Video instructions: [|Module 3 link]. Choose Customize Jetpack jumper. Or Written instructions: [|How2Customize] (scroll down, the instructions are on this page).

2. Video Interviews [|Reel Reelz]

U1-Lesson 2--Become familiar with TouchDevelop and work to define "computer program."
Objectives (SWBAT):
 * Explain the concept of a "computer program"
 * Descrive the structure and goals of this couse
 * Sign in to TouchDevelop account
 * Find scripts in TouchDevelop account

A. Review rules, goals, and structure of //Jetpack Jumper Complete//. Class discussion of commonalities and differences in student lists from D in Lesson 1. Write each item from your group list on a postit note. Organize postit notes on white board with like rules grouped. There are approximately 5 main ideas.

B. Sign in to [|TouchDevelop]. Open this document: In a separate browser tab, go to [|JetpackComplete]--select **edit in TouchDevelop.**

In teams of two, examine the code for the //Jetpack Jumper Complete game.// You may look at the code on touchdevelop as well as on this handout. Search for portions of the code that aligns with the rules, goals, and structure of the game. Make notations on the handout with the number from the list compiled earlier.

After you have completed your list, join with another team of two and compare their findings with yours. (you may print one teams code sheet if needed). Come to a consensus and revise labeling to end with one product from your group of four.

Class discussion on results of group work. Reconcile any differences. (Open code on smart board and label)

C. Find scripts in TouchDevelop. select **my scripts.** JetPack Jumper should now be listed in **my scripts.** //(if you are still on the page from B above, click the back arrow at the top left).//

D//.// Open Work with a partner to describe a computer program by filling in the chart. After filling in each quadrant, write a definition that takes your descriptors into consideration. Class discussion on definition to come to consensus.

Extra opportunities: 1. Customize your TouchDevelop profile. You may change wallpaper, nickname (must contain at least your first name).

2. Customize your Jetpack Jumper Complete game: View video-on-demand instructions for customizing the Jetpack Jumper Complete at [|Customize Jetpack Jumper] or view[| online documentation].

U1-Lesson 3--Identify computer game genres, categorize games, and identify elements that make games fun.
Objectives:
 * Describe Characteristics that make games fun
 * Define "genre" and describe genres for games
 * Categorize games into genres
 * Describe characteristics of successful games

A. Answer the following questions and share with a partner:
 * What was your favorite game or activity as a younger child?
 * What is your favorite game now?
 * How has your idea of fun in games changed?

B. Categorize Games On (four) postit notes, list a game you enjoy. Add three characeristics of each game to the card (goal, rules, number of players, fun factor, special challenges, scoring, etc) In groups of 3-4, categorize games into similar categories and give that category a name.

C. Define "genre" and identify computer game genres.
 * As a class, discuss category names that teams created.
 * Define "genre" as a category of artistic composition (as in music or literature) characterized by similiartieis in form, style, or subject matter.
 * How are student-created genres related to commonly recognized computer game genres? [|Game Genres]
 * Decide on common names for genres as identified by students.
 * Group notes into corresponding genres.

D. Define "fun"
 * Discuss what makes games fun.
 * Create a list of must-have attributes (save for later)
 * Discuss how these might be different for different groups of individuals and between individuals.

E. Discussion post--post to the "What makes games fun" discussion below.

Extra activities: [|Video Game Genres]

Poll your friends and family. Ask them what makes a game fun? Collect responses as text, audio, or video.

U1-Lesson 4--Make Connections between code for a game and rules, goals, and structure of the game.
Objectives:
 * Identify and name basic features and tools in TouchDevelop programming environment
 * Describe rules, goals, and structure of the //Chase and Gather Pro// game
 * Describe the elements of //Chase and Gather Pro// that make it successful
 * Identify code that relates to the game's rules, goals, and structure

A. Review definition of "fun" from discussion posts. Share any videos, audio or text students collected from friends and family.

Questions?
 * B. Video- Welcome to Touchdevelop

C. Analyze rules, goals, and structure of //Chase and Gather Pro// With another student, take turns playing //[|Chase and Gather Pro].// Record observations in Part 1 this document:

D. Examine the code of //Chase and Gather Pro// Work with a partner to complete Part 2 of the 1.04 Activity document, Class discussion to summarize findings.

Extra Activities: Modify the //__Chase and Gather Pro__// game in some way.

U1-Lesson 5: Decompose problems and explore algorithms
Objectives: SWBAT
 * Decompose a familiar problem into simple steps
 * Illustrate a process with precision and clarity
 * Define "algorithm"
 * Identify problems as hard or easy for a computer to solve

A. Think about the hardest task or most complex event you ever had to plan and carry out. What made it so difficult? Could a computer have solved the problem easily? Why or why not? Students volunteer to share answers with class.

B. Decompose a problem--How do you make toast? (25 mins) 1. Use your note cards to draw the steps required for making a piece of toast, one step per card. No words allowed-sketches only. (5 mins)

2. Get into groups of 4-5 students. Without speaking students use team's cards to create the best instructions for making a piece of toast. Students may arrange cards on poster paper. No text! Students may draw on the paper or alter the drawings. (10 mins)

3. Open this document: or this form [|Part 1 Activity 1.05] Complete Part 1.

4. Debrief with class discussion and challenges of decomposing problems and effectively communicating steps.

C. Define Algorithm (10 mins) View video: [|What's an algorithm]

Class discussion to define algorithm. One student write on white board. Were the steps for making toast an algorithm?

D. Categorize problems as easy or hard. (10 mins) Complete Part 2 of the 1.05 document above. ( can do individually or as a class)

Extra Activities: View this video: [|Wicked toast problem] create an algorithm with cards for solving a complex problem in your life. Ex: plan an event, plan a trip, select a college, clean your room.

U1-Lesson 6: Explore a "hard" computer problem with an unplugged activity and demonstrate problem solving skills in a quiz.
Objectives:
 * Collabroate to solve //The 4-Color Map Problem//
 * Identify characteristics of problems that are hard for computers to solve
 * Demonstrate probloem-solving skills (decomposition and algorithms) in a quiz

A. Review hard problems (5 min) Review the chart from question 2 that was complete in Lesson 5 D. Q: What characteristic(s) makes a problem hard for a computer to solve? Create a short list and discuss.

B. Unplugged: Explore a hard problem (30 min) 1. Open this document: 2. Work with a partner to solve the problems.

3. Activity closure: Class discussion--Why would this problem be hard for a computer?

C. Quiz--Complete the Unit 1 Lesson 6 Quiz in goformative.com

[|Dominating Sets]

[|Minimal Spanning Trees]

[|Steiner Trees-Ice Roads]

Extra opportunities:
 * Develop an algorithm for solving the unplugged problem

U1-Lesson 7: Coordinate System and Positioning of Sprites
Objectives:
 * Plot points on a gaming coordinate system
 * Identify code used to create and position sprites

A. Complete the //[|Collage Tutorial]--//Sign in to TouchDevelop and open the Collage tutorial https://www.touchdevelop.com/scjj

Open and download this file:



Complete the tutorial and 1.07 exercise. You may use "insert" and "shapes" to mark the spot to answer questions 4-6. Take your time to prevent having to repeat the tutorial!

Class discussion on exercise questions.

B. Go to [|Mark The Spot!]. Run the program (don't edit). The goal is to tap or click at the indicated point. 10 correct guesses wins. 3 misses loses.

C. Answer the discussion question below: How is the TouchDevelop coordinate system similar and different from coordinate systems you have seen in the past?

Extra opportunities:
 * Locate the //Mark The Spot// script in your "my scripts" section. Inspect the code for the script by selecting **edit**. Identify the following:
 * Code responsible for providing start up instructions
 * Code responsible for scoring
 * Code responsible for removing a life
 * Code responsible for responding to a tap on the board
 * Code responsible for determining if you have won

U1-Lesson 8: TouchDevelop Personal Collage Project
A. Warm up--Volunteer from class to draw a rectangle representing the TouchDevleop game board (w=800, h=400) and plot the following points: (0,0), (400,200), (800,0), (800,400). (5mins)

B. Personal Collage Project (30 mins) Open the 1.08 Activity file: Discussion of project and expectations. **REMEMBER--DO NOT UPLOAD PICTURES OF YOURSELF OR ANY OTHER PERSON. ALL IMAGES IN TOUCHDEVELOP ARE PUBLIC. Do not use any personally identifiable information such as full name, location, etc.**

1. Locate the code you created in the Collage tutorial in Lesson 7. Review this code.

2. Complete 2-4 of the project. Use the rubric to assess your progress. If you need assistance, ask the teacher or another student.

C. In the discussion below, summarize your progress and what you have left to accomplish.

**U1-Lesson 9: Complete Personal Collage Project**
A. Warm up: Review the discussion below**.** Students volunteer to share progress with class. Students discuss whether they have a problem that will prevent them from making progress.

B. Complete the personal collage project (25 mins). After the project is complete, fill in the rubric to score yourself on your collage. You can make comments in the table (on your progress). Complete the reflection questions.

C. Gallery Walk-Students receive nine post-it notes. (three each of three different colors). Three students volunteer to open project for viewing. Students move to each project and leave comments as follows: One positive comment (purple), one suggestion (blue), and one question (yellow).

**U1-Lesson 10--Give and receive feedback and incorporate feedback into project.**
A. Students get purple (positive), blue (suggestion), and yellow (question) sticky notes. Each student opens their project. Students continue gallery walk and comment on at least 4 more projects. (20 mins)

B. Students return to their projects. read feedback and determine how to modify collage based on feedback. Incorporate any changes (10 mins)

C. Discussion: Answer the post below for lesson 10.

=Unit 2--Spinning the Globe: The Use of Randomization in Games= "Big Questions" What are random numbers? How can random numbers be used in games? Why use random numbers? In what ways can games educate and inform, not just entertain? What are the elements of a good presentation?

U2-Lesson 1-Learn new elements of TouchDevelop and explore random numbers
SWBAT:
 * Identify the basic coding elements of the TouchDevelop programming environment
 * Use the random range function in TouchDevelop to generate random numbers

A. Review //TouchDevelop tutorials// and Welcome to //TouchDevelop// videos. (10 mins) aka.ms/ExploringTouchDevelop aka.ms/WelcometoTouchDevelop

Locate an element shown in either video. Be prepared to describe the element in a class discussion.

B. Open the Random Tutorial Exercise: (20 mins) Please note, question 4 is designed as a discovery exercise. Analysis is important rather than correct answers.

Go to the //[|Random tutorial]//

Answer the questions in the 2.01 document as you work through the tutorial.

C. Use of Random numbers in games and apps (10 mins) Work with a partner to come up with as many uses of random in computer applications/games as you can think of in five mins.

Class create a master list on the white board or poster paper. Categorize the list. The categories may include games, web advertising, social media, tests/quizzes. (5 mins)

D. Journal Entry. Post an entry in the discussion below (Programming Random Numbers). Answer the following question: "I'd like to try to use what I learned about programming random number to create ."

U2-Lesson 2- Expand understanding of random numbers and apply random in design of unplugged game.
SWBAT:
 * Analyze a game to discover how random numbers are used in a game.
 * Create an original game that uses random numbers.

A. Play //Roll the Dice//! and analyze the rules (10 min) What do we remember about randomization from the tutorial in the previous lesson? Why is randomization an important element in games and other applications?

Play //[|Roll the Dice]// game (3 minutes) Now work with a partner to decipher the rules of the game. Answer the following with a partner:
 * What are the various components of the board?
 * What happens when they click or tap the board?
 * How is random involved? What is the range of numbers?
 * What happens when two dice match? How about three?
 * What other decisions do you think this program has to make?

B. Analyze code for //Roll the Dice!// (10 min) Join another group with your property. Compare your analysis results with that team. Did you have the same answers? Did a team miss anything?

Look at the code for //Roll the Dice!// and identify code that you understand.

Display code on smartboard---students share code knowledge.

C. Unplugged: Apply random numbers in designing a new game (20 mins) 1. Work with a partner to design a written unplugged dice game and come up with a set of rules.

2. Look at the die provided by the instructor.

3. Assign a step or a rule to each side of the die. __For example__, each side of the die could be assigned a shape: a. Square b. Circle c. Triangle d. Narrow rectangle e. Polygon f. any parallelogram

4. Come up with a goal for the players. In the instance above, the goal could be to create a drawing composed of the shapes the player gets wtih five rolls of the dice.

5. Test your game.

D. Feedback Pair with another team and play each other's games. Provide one suggestion on how to improve the game.

Extra Opportunities: Watch the youtube video [|How Machines Generate Random Numbers with Time]

Search for "dice games for kids". Find two dice games that you think are fun. Write code statements that would be needed if you were going to create this game in TouchDevelop.

U2-Lesson 3--Investigate the ways games are used in eduction, business, entertainment, and collaboratively.
SWBAT: Describe multiple ways that games are used to educate and inform

A. Discuss electronic games that have a goal and are fun.

B. Independent research (15 mins) Browse the [|Serious Games] website for approximately 5 mins. Class discussion--create list of games and categories--education, corporate, health, military, etc.

C. Create a Pecha Kucha (25 mins) Choose teams made up of groups of four. Each team will choose a category to research and create a presentation Pecha Kucha, which means "chit chat" in Japanese. The presentation normally consists of 20 slides--20 seconds each. For this assignment, you may use 5-10 slides for 20 seconds each.

Example of a [|Pecha Kucha] http://www.pechakucha.org/channels/table-xi/presentations/a-billion-messages-for-good

Download this document for directions and rubric for the Pecha Kucha.

Begin your research and presentation. Remember to cite online sources including the author, title of the article or page, the web address or URL (in Italics), and date of pubication. You may not be able to find all of these. Locate as many as possible. Example: Johnson, Mark. "How to Make Perfect Pretzels.: http://perfectpretzel.com. 20 February 2015

U2-Lesson 4--Finish presentation on games used in education, business, and entertainment.
SWBAT: A. Locate assessment rubric and compare project with rubric to be sure team is on track. Identify: B. Group Research (45 mins) Pace your work. At the end of the 45 minutes, the research and project should be complete.
 * Use online resources to collect information about game genres
 * Contribute to a collaboratively created presentation
 * One interesting thing you have learned from your research.
 * One difficulty you have encountered.
 * Any questions or problems.
 * Any suggestions for other teams?

U2-Lesson 5--Present research on games used in education, business, and entertainment.
SWBAT:
 * Communicate learning with a Pecha Kucha presentation
 * Provide constructive feedback to peers
 * Self-assess research project with a rubric

A. Presentation delivery. Teams will present research, learn from each other, and support each other via feedback. Open the 2.05 Peer Evaluation document.



Complete the form for each group. You may use multiple forms or label each answer for each group.

B. Share comments by offering a: Compliment Question Suggestion

C. Self-evaluation. See page 3 of the 2.03 activity. Answer questions 13-15.

U2-Lesson 6--Brainstorm and share ideas for improving the //Chase and Gather Basic// game.
SWBAT:
 * Think of creative modifications to the //Chase and Gather Basic// game.
 * Demonstrate knowledge of random numbers

A. Re-examine the //[|Chase and Gather Basic]// game. Evaluate the game from the viewpoint of a computer engineer (look at random coding), and from the viewpoint of a game designer (develop topics or subjects for a similar game) (5 mins)

B. Game Design. ( 30 mins) You will be assigned one of the following topics :
 * sports
 * jungle
 * city dump
 * pets
 * health
 * safety
 * education
 * Other ideas?

On a large piece of paper, describe and/or sketch a chase and gather type game that you would like to create. (10 mins) The sketch/design must include the game setting, characters, goal, obstacles, basic rules, and how random would be utilized.

Teams will share ideas with class (5 mins)

C. Quiz. [|Unit 2-Spinning the Globe.]

=Unit 3--Shifting Into Gear: Controlling Game Objects= Big Questions:
 * What is an object in coding and how are objects used?
 * What is a function and how are functions used?
 * Why do different objects have different functions associated with them?
 * What is a parameter and how are parameters used?
 * What is a variable and how are variables used?
 * What is a variable type and why is it important?

U3-Lesson 1--Explore objects, functions, and parameters with a tutorial and an accompanying exercise.
SWBAT: Identify objects and functions in programs and parameters within functions.

A. Discussion: What "things" have you programmed or "told what to do" in a program? These "things" are objects. What "actions" or commands have you given these objects? These commands are functions.

B. Open 3.01 tutorial exercise and save to your drive:

Complete the Objects and Functions tutorial Exercise. (20 mins) Complete the 3.01 activity during or after the tutorial. As you complete the tutorial think about the turtle as the object and look at the functions the turtle performs throughout the tutorial. Examine the information given to the function, such as "100" in the function call **forward(100).** This info is called a parameter.

C. Open the 3.01 Activity and save to your drive: Work with a partner to complete the activity.

D. Journal: Answer the Unit 3-Lesson 1 discussion question below.

U3-Lesson 2: Write code to solve a maze game and analyze problem solving strategies.
SWBAT: Program a solution for the turtle maze problem

A. Review Discussion: State an example of an object found in a game. What functions can it perform? Does the function require a parameter? What is the parameter?

B. Open 3.02 Activity:

Highlight objects in yellow, functions in blue, and parameters in orange.

C. Turtle Maze problem--You will write code to move a turtle through a maze. Follow the directions below. 1. Open Find the Way. Select **edit on TouchDevelop.** Select **edit.** Select **split.** Select **run.** 2. Write code to navigate the turtle through the maze to reach the goal at the top of the screen. (there are two solutions).

D. Wrap up: Did it take longer than you thought to solve the maze? What was your first step in solving the problem? What problems did you encounter? How often did you revise your script?

U3-Lesson 3--Declare a variable in TouchDevelop and save input data in variables.
SWBAT: Declare and use variables in a TouchDevelop program.

A. Discussion--How do players provide input in electronic games? What different kinds of data might be input? (5 mins)

B. Variable Container Activity: (5 mins) Using list from A, students will list an input on a sticky note and place on outside of cup. Another student will write the actual data on a piece of paper and put it inside the container. Repeat with other items from the list created in A. Explanation: variables are the containers that hold pieces of input/data within a program. The container represents the variable, the sticky note represents the name of the variable, and the note card represents the actual data.

Discuss variable names. What makes a good variable name? Ex. lastName would be good for someone's last name, but not just "name" because that would not be descriptive enough.

C. Open Variables and User Input Tutorial 1 Open the 3.03 Tutorial Exercise document

Look at a variable in the code. Decide whether the name is descriptive enough and make possible suggestions for change.

D. View the Coding in TouchDevelop video (10 mins) Questions?

E. Currency Converter. (15 mins) Locate a currency converter. Suggestions are Currency converter or Rates Convert US dollars to a currency of your choice. Choose a currency that you wish to use for your program--record the conversion rate. Locate images you wish to use in your currency program. (pictures from the country of the currency you chose).

Extra Opportunities: View Kahn Academy

View How Stuff Works

Customize the Variables and User Input Tutorial 1 program. Consider: Should a person be able to enter any x or y coordinate? What if the triangle is drawn off screen because of the coordinates? Is there a way to prevent this? Change the requested range. Experiment with if statements. Make another shape by adding a triangle. Adjust the variable names or ask for new input.

U3-Lesson 4--Use variables and input and create a currency conversion program.
SWBAT: Create a currency conversion program

A. Review: B. //Variables and User Input Tutorial// 2 (10 mins) As you complete the Variables and Input Tutorial 2, pay attention to how the tutorial demonstrates how Fahrenheit (input) is stored in a variable and then converted to Celsius to display a new value. The process of converting from dollars to a currency of your choice will be similar.
 * What is a variable and why is it used in a program?
 * How are variables used with input?
 * What types of input can be stored?

C. Observe Currency Converter Example-(5 mins) Watch as a currency converter program is demonstrated. What algorithm could be used for this conversion?

D. Create a currency converter program (20 mins) Open 3.04 Activity. Use the first page as a guide for completing the assignment.

Open Variables-On Your Own. This file contains the instructions for the program. It is not a tutorial to follow. Remember to name the variables clearly to describe the data you are storing.

E. Self-Assessment (10 mins). Use the rubric and questions at the end of the 3.04 Activity page to assess your project. In the discussion question for 3.04 below, explain how you designed your currency converter and discuss any problems you encountered and how you resolved them.

Extra Opportunities: Customize you currency conversion program by:
 * Designing a different way to display the information.
 * Adding another conversion option.

U3-Lesson 5--Continue learning about objects, functions, and variables and create a storyboard for a game.
SWBAT: Analyze a game sequence and create a storyboard

A. Review-Where in a chase-and-gather game could the user input be used?

B. Chase and Gather Tutorial (20 mins) Open 3.05 Tutorial Ex.

Complete the Chase and Gather Tutorial. You may complete 3.05 during or after the tutorial. When complete, switch with your desk partner and examine the markings in the code sample. Note any differences and discuss them to try to come to a resolution.

C. Understand Storyboarding (10 mins) Brainstorm a description of a storyboard--list ideas on the board. Note: Storyboarding is like creating a plan, similar to what a builder does in creating a blueprint to build a house. Many jobs require storyboarding to organize ideas. the storyboard may be created by a team of designers--each bringing their own expertise and creativity to the project.

View: https://www.youtube.com/watch?v=7LKPVAIcDXY Pixar Storyboarding Mini Doc

D. Create a storyboard (15 mins) Open 3.05 Activity.

Use the Chase and Gather Tutorial or Chase and Gather Tutorial Exercise if needed for reference.

Extra opportunities: Customize the Chase and Gather program by adding or changing obstacles or targets. Change x or y random range limits. How do you avoid undesirable results?

=Unit 4=

U4-Lesson 1--Explore the concept of events by relating to Rube Goldberg machines.
SWBAT: Identify an event and describe what is meant by a random number within a range.

A. (10 mins) What happens when you get up in the middle of the night and stub your toe on the leg of the bed? Of course, you cry "Ouch" or just cry. This is an event (stubbed toe) which caused a response (Ouch or crying).

View the Rube Goldberg Machine video.

Count the number of events that occur in the videos.

B. Events Tutorial (15 mins) Open 4.01 tutorial

Complete the Events tutoriall and the "Challenge Mission" in the final step. Share your completed work with your friends (publish in TouchDevelop if you wish)

C. Events with games (15 mins) In the Chase and Gather Basic tutorial from Unit 3 Lesson 5, could additional events be used? What are some of your ideas for game events?

D. Journal Entry: (5 mins) In discussion 4.01 below, define an event and name something you learned from the tutorial.

Extra Opportunities: http://csis.pace.edu/~bergin/Java/eventfundamentals.html
 * Event Programming Fundamentals (uses Java examples)

http://engineering.mit.edu/ask/can-computer-generate-truly-random-number
 * Can a Computer Generate a Truly Random Number?

U4-Lesson 2--Understand and write event handlers in the //Chase and Gather// game
SWBAT: Create an event in TouchDevelop

A. Discussion-- What event have you reacted to since our last class meeting?

B. Complete the //Chase and Gather// Events Tutorial (10 mins)

C. //Learn to code with CODExist: The Birth of Bot-Module 4//

D. After viewing the previous video, Answer the following prompts in this google form: "Three ideas from this video are ________________, ______________, and____________. The most important thing I learned is ___________.  (There are two questions in this google form. Please answer both.)

Extra Opportunities: Explore modifying the collage project from Unit 1, Lesson 7.
 * How can the project be modified using events?
 * Record sound files that correspond to elements in their collages.
 * Add tap event handlers to play a recording when the corresponding element is tapped.

Modify the existing events within the Chase and Gather game. Note: The event for the hero overlapping another sprite is in the "Check Collisions" code.
 * 1) Currently, the game says "Yum, yum" when the hero collides with the vegetables and burps when the hero collides with the piece of pie. Come up with alternate sounds for vegetables and the piece of pie.
 * 2) Record your own sounds(if possible)  for vegetables and the piece of pie. Load them into TouchDevelop and use in the game.

U4-Lesson 3--Explore the concept of conditionals through an unplugged activity and then write conditional statements.
SWBAT: Identify a conditional, write if-then and if-else and conditional statements.

A. Intro to conditionals. (15 mins) One student choose a number between 1 and 100. The other student should try to guess their number. Tell the student higher or lower until they get the correct number. Document guesses and count the number of guesses it takes to determine the chosen number. (hint: always guess half of the available numbers) Hand write in sentence form, an if/else algorithm. Let the teacher check your statement for understanding.

B. Conditionals Tutorial 1 (if) (10 mins) Open the U4.03 Tutorial Ex. below. Save to your drive.

==

1. Complete the ConditionalsTutorial1 (10 mins) Complete U4.03 as you go or when you finish.

2. Complete the ConditionalsTutorial2 (10 mins).

Ask the teacher to review your 4.03 Tutorial Exercise for understanding.

Additional resources--How to guess mystery numbers

U4-Lesson 4--Add Boolean logic (**and,or**,and **not)** to conditional statements then translate to coding statements.
A. Review decision structures (5 mins) Summarize conditionals from the previous lesson. If you need reinforcement, check your 4.03 tutorial exercise doc.

B. Apply logic with **and, or**, and **not** (20 mins) Locate the deck of cards (objects). Select and group the objects based upon some criteria based on the following instructions: 1. Select a subset of the objects based upon criteria decided by your partner or group. 2. Write the conditional that reflects the nature of the objects selected 3. Look again at the selected subset of objects. Does every item in the subset meet the criteria? 4. Look again at the remaining unselected items in the original collection. Are there any items in the unselected group that should be moved to the selected subset? 5. Now, add the unselected subset items back into the larger collection and create another subset based upon different criteria. 6. What is the most complex conditional you can create from the collection?

Hints: Each suit contains face cards and numbered cards. Face card can be a spade **or** heart **or** diamond **or** club.

Take pictures with your ipad to document the various subsets. Show to the teacher to check for understanding.

C. Code Conditional statements. (20 mins) Work together to create a list of conditional statements that might be used in the Chase and Gather game. Document (record) these ideas on note cards for sharing--one conditional per card. As you create, use complex conditionals with **and, or,** and **not.**

Examples:
 * Player wins with 500 points.
 * Game is over if hero goes off the top **or** bottom of the screen.
 * Player wins if score is 500 **and** time is greater than 0.
 * Player wins if lives are greater than 0 and time is **not** 0.
 * Another target is added to the game when the score is greater than 300 **and** time remaining is greater than 0

Each student should now choose a conditional statement from C above. On the note card, rewrite the conditional statement in TouchDevelop code syntax. Review other students work and make suggestions on how the code could be improved--make suggestions on the back of the card.

D. Roll the Dice. Play the [|Roll The Dice!]game. Identify the conditions met for scoring and losing a life.

E. In the discussion section below for 4.04, write a response to the following: Think of three decisions you made today outside of class. Wrtie a conditional sthat reflects each decimation. Include one example for **and**, one for **or**, and one for **not**.

Additional Resources Boolean Operators

Unit 4--Lesson 5--Review Random and Conditional concepts
SWBAT: Apply random and conditionals in TouchDevelop.

A. Think about the conditional statements you wrote in Lesson 4. Did you use **and, or,** and **not conditionals?** (5 mins)

B. Roll the Dice game (10 mins) Play the Roll the Dice game for a few minutes (2-3). Where might random be used in this game?

C. //Roll the Dice// tutorial. 1. Open 4.05 tutorial Ex, and complete during or after the tutorial. .

2. Go to [|Roll the Dice] tutorial.

Notes to consider:
 * The first pair of dice that are created are placeholders. The placeholders hold a spot for the three dice numbers that will randomly be generated later. These placeholders are not actually the dice.
 * Creating the code to listen for a tap or click is an example of an event that will cause something to happen in the game.
 * Creating code to show one of six sides of the die is a random event with a range from 1 to 6.
 * Determining which image to show uses a series of if/then/else statements.
 * When images are chosen for each side of the die, then names may not seem correct. Why do you think this is? For example, when the image for die 1 is used, TouchDevelop assigns the name die 4 to it, but the image is the side of the die with one dot. Why?
 * Should points be awarded for this game? This is where conditional statements and the use of **and** and **or** statements become useful. If die 1 **and** die 2 **and** die 3 are all the same, then the player gets a lot of points. If any two match (**or**), then the player is awarded fewer points. If none of the die match, the player loses a life.

D. Condiitonals Quiz Complete the following quiz. If you finish, you may complete the Extra Activities item. [|4.05 Conditionals quiz]

Extra Activities: Add additional dice to the Roll the Dice game and adjust the conditional statements as necessary.

=Unit 5--Shifting Into Overdrive=

Big Questions

 * What does "on every frame" mean?
 * How is "on every frame" used in games? Why is it important?
 * What is a "for loop"?
 * Why are "for loops" important?
 * What is a custom function?
 * How are custom functions different from functions associated with objects? How are they similar?

U5-Lesson 1--Explore "every frame" code
SWBAT: Explain "on every frame" code and write TouchDevelop code using the "on every frame" statement.

A. Discussion (10 mins) Consider the following situation--"Have you every had some exciting plans for after school and the day just seemed to drag on and on? How often did you look at your watch or the clock?" Do you think most people will continue to check the time when they are excited or nervous about an upcoming event (repeating a check-the-clock event) or do they rarely pay attention to the time.

What other events from your life can you identify that happen over and over again? What negative consequence can the repetition cause? Boredom? Errors? This is the same kind of activity that needs to happen in games. TouchDevelop configures this repetitive checking on an event by using an "on every frame" statement.

B. [|On Every Frame Tutorial](20 mins) Download the U5.01 Tutorial Ex. document. Save to your drive and complete the exercises during or after the tutorial.

Complete the On Every Frame Tutorial. Submit your work by publishing in TouchDevelop.

C. Apply "on every frame" statement to the //[|Chase and Gather Basic]// game (15 min) 1. Play the Chase and Gather Basic game for a few minutes to refresh your memory if needed. 2. With a partner, brainstorm ideas for where additional conditionals and "on every frame" strategies could be used within the //Chase and Gather Basic Game//. 3. Complete the //[|On Every Frame Tutorial]2.//

D. Answer the discussion for U5, Lesson 1 below.

Extra opportunities: "Conditional Statement" http://www.computerhope.com/jargon/c/contstat.htm

Unit 5-Lesson 2--Explore the power of **"for loops"** as applied to the use of **"on every frame."**
SWBAT: Identify, apply and write a loop.

A. Complete the [|Loops Tutorial 1]

B. Think about this situation: Ryan works in a marker factory where his job is to put caps on markers. Ryan starts out at 8:00 each morning and caps each marker as it passes in from of him. By lunchtime, Ryan has capped at least 5,000 markers, and by the end of the day, he has capped at least 11,000 markers. What do you think of Ryan's job? What options should management explore to accomplish this task? What advantages are there to other options? Answer B. in discussion below.

C. Open Loops Tutorial Exercise 5.02.



Complete this as you complete the [|Loops Tutorial 2].

D. In pairs or individually, complete the following: You may create this from scratch or modify the Loops Tutorial 2 to accomplish the task. Show teacher your completed work and then we will publish in TouchDevelop.
 * Create a program in which 30 items are created on the screen
 * Create a decagon (10 sided)
 * Create a program in which a triangle, square, pentagon, and decagon are used on the screen. The figures should not overlap.
 * Create a program that draws figures with 3-10 sides using nested for loops.

Unit 5-Lesson 3 & 4--Create Functions
SWBAT: Identify and write custom functions.

A. Open the 5.03 Tutorial Ex. document.

Complete [|Custom Functions tutorial]

B. Answer the questions in this [|google form]:

C. Design your Dream House. Open the 5.03 Activity

Read the document paying attention to the rubric. Think about how you might meet the rubric requirements. This will take approximately two class periods to complete.

D. After you have completed the project, copy your code to a word document. Label as follows:
 * Underline your two uses of functions.
 * Circle the function that uses parameters.
 * Place a rectangle around the uses of turtle headings.
 * Place a star beside the use of an unlisted rubric concept.

E. Complete the self-assessment and reflection portion of the Dream House Activity. Show your teacher.

Unit 5 Lesson 5--Variable Types
SWBAT: Understand different variable types and use them in projects.

A. Discussion: Have you heard the expression "it fits like a square peg in a round hole"? What does this expression mean to you? Today we will learn what this expression means using variables. Values can only be placed into a variable with the right "shape" or "type".

B. Open the 5.05 tutorial exercise below.

Complete the [|Custom Functions tutorial 2] As you complete the tutorial, think about what you are discovering about number and string variable types.

C. Think Pair/Share Individually-Think about the kinds of information used in the games that you play. Create a list of information (data/values) used in video games. Beside each data element or value, write the variable type that you think the variable would need to be to store that particular value or data. Think about examples in which strings are used and examples in which numbers are used. What other kinds of information and data types are in the code?

Pair with another student--compare your lists. Merge the two and eliminate duplicates. Now classify your new list according to use: input, output, or some other game use. Show to teacher to check for understanding.

D. Complete the discussion below for 5.05.

Unit 5 Lesson 6-- Add Enhancements
SWBAT: Describe and add enhancements such as splash page, background scene and other effects to projects.

A. Think about video game elements that make games more appealing or interesting. Did your list include creative openings, background music, animations, and challenges?

B. Open and save the Adding Bells and Whistle Tutorial Exercise.

Complete the [|Bells and Whistles tutorial]

C. Get with a partner and discuss ideas for adding bells and whistles to the //Chase and Gather Basic Gam//e. Make a list on a word document and save it to your drive--be very specific about what you want to add.

D. Complete the Unit 5 quiz in wikispaces. Unit 5 MS Computer Science.

=Unit 6 --Charting New Territory=

Big Questions

 * ===What are the characteristics of an effective team?===
 * ===How is planning related to a successful project?===
 * ===What makes a game successful?===

Unit 6--Lesson 1 Build Collaboration Skills
SWBAT: Collaborate to repair a game.

A. Challenge: The game at this address is broken https://www.touchdevelop.com/olfea

Use the Activity 2A to assist in making all corrections.

B. Challenge2: Build your own version of the Chase and Gather game. Use this script as a starting point.

https://www.touchdevelop.com/olfea

Use the Activity 2B to assist in completing.

C. Challenge3: Build your own touchdevelop game.

Use Activity 2C to complete this assignment.

Unit 6--Lesson 2--Prepare and Pitch a project
SWBAT: Work in a team to decompose their project into a storyboard.

A. Choose a team of 2-3 students. Decide ground rules and guidelines for the team. Consider what attitudes and behaviors contribute to a successful project. (5 mins)

B. Project--Your team will plan a project and create a storyboard (30 mins)

In lesson 3, you will pitch your project idea to the other team(s). Come up with a plan for a project that will take approximately 5 hours of programming to complete. Your pitch should be no more than 2 minutes. Be creative in how you present your plan. As part of your pitch, create a rough storyboard using the Storyboard your Game 6.02 activity.



Unit 6- Lesson 3--Pitch your project
SWBAT: Communicate reasons for selecting a topic, give and receive constructive feedback, and assess and incorporate feedback.

A. Download and print the following document.

B. Take turns as a team and present your "pitch" or idea for a game to the other teams. Observers should offer at least one compliment, ask at least one questions, and make at least one suggestion. Use the following document to record the information you received from the observations After each team has presented, meet with your team to discuss feedback and any changes you wish to make.



Unit 6---Lesson 4--Create detailed work plans
SWBAT: Plan projects and delegate responsibilities

A. Watch the TouchDevelop Beyond the Basics video. https://mix.office.com/watch/y82qfz7v9tdy

As a team, discuss what you already know that will be helpful in creating a successful project. Consider structures, design elements, algorithms, teamwork skills,etc. What do you know and what do you need help with?

B. 1. Create a game name and project name (5 mins) 2. Decompose tasks and create scrum boards (30 mins) Work with your teammates. List every possible task involved in your project. Refer to 6.02a, b, and c as needed for general requirements. Use a Scrum board to track the progress of each team. Use sticky notes to label each task listed in 6.04 (initial to show ownership).

Game companies use this process to help everyone stay on task and help managers keep track of what is going on. The "in review" column is an indicator that a task is ready for the teacher's approval and only the teacher can move the stick note to the final column.



Unit 6--Lesson 5-10--Work in Teams to Code Project
SWBAT: Collaborate on a team project, meet project deadline, gather user feedback and adjust project as necessary.

Lesson 5-7 (3 class periods) are spent dividing tasks and working collaboratively to create the game project. I will check in each day to monitor progress. Update the Scrum board as needed.

Lesson 8 ( 4th day) Projects will be presented to other teams. Record feedback your team receives from the other teams on the 6.09 activity. As you discuss your project, state what you have accomplished so far and what you still need to do. After teams have provided feedback, meet back as a team and discuss revisions. Update Scrum board if necessary.

Lesson 9 (5th day) Incorporate feedback received during previous lesson.

Lesson 10 (6th day) User observations. Use 6.10 Activity 1 to conduct observations in the following manner. 1. Game designers should observe someone from another game playing their game. The designer is looking for problems, frustrations, length of time to score points, length of game, and length of time until the player loses interest. This feedback is called data and is important because it informs a designer's decision about how to improve or change the game. to better serve user's needs. Record what you wish to change about the game in question 4.

2. Game designers should use the 6.10 Activity 2 to conduct interviews. Take careful notes of what the user says. Ask the user to repeat or clarify anything you do not understand. If time is limited, ask most relevant questions.