Building a Scorekeeper Alice 3 Tricks in Mini Trivia (1/4)

Slides:



Advertisements
Similar presentations
MS® PowerPoint.
Advertisements

Alice Learning to program: Part Four Creating Sounds, Making Billboards, Fun with 3-D Text, New Events, and Rotating Objects by Ruthie Tucker and Jenna.
Coloring Randomly: Random Selection in Alice By Jenna Hayes under the direction of Professor Susan Rodger Duke University July 2008.
Princess & Dragon Part 2: Teaching a Dragon to Fly—Methods & Properties By Elizabeth Liang under the direction of Professor Susan Rodger Duke University.
This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation. All.
1 of 4 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Class-Level Variables in Alice By Jenna Hayes Under the direction of Professor Rodger Duke University, July 2008.
Wizard Game: Class-Level Variables in Alice By Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July
PowerPoint: Tables Computer Information Technology Section 5-11 Some text and examples used with permission from: Note: We are.
1 Quiz Template: Click on the match By Deborah Nelson Duke University Under the direction of Professor Susan Rodger July 2009.
Animated Charting Using the Alice Bar Chart Template World By Elizabeth Liang under the direction of Professor Susan Rodger Duke University December 2010.
WorkPad 4 Quick Start WorkPad 4 Quick Start  Business Optix brings the rigor and discipline of business modelling and design into.
Line up By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Visual Basic Chapter 1 Mr. Wangler.
C51BR Applications of Spreadsheets 1 Chapter 16 Getting Started Making Charts.
Making a Boat Racing Game in Alice By Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July 2010.
Microsoft PowerPoint Getting Started Guide Prepared for Towson University Dr. Jeff M. Kenton Amy Chase Martin 2007.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 4 1 Microsoft Office FrontPage 2003 Tutorial 4 – Using Shared Borders and Themes.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 5 Enhancing Forms with OLE Fields, Hyperlinks, and Subforms.
Introduction to Arrays. definitions and things to consider… This presentation is designed to give a simple demonstration of array and object visualizations.
Nonvisual Arrays and Recursion by Chris Brown under Prof. Susan Rodger Duke University June 2012.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 5 Enhancing Forms with OLE Fields, Hyperlinks, and Subforms.
Changing Color, Using Text Objects, and Random Selection in Alice By Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July 2008.
By Melissa Dalis Professor Susan Rodger Duke University June 2011 Multiplication Table.
Making a Timer in Alice By Jenna Hayes under the direction of Professor Susan Rodger Duke University July
1 ball, 2 ball, red ball, blue ball By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Microsoft Access 2000 Presentation 3 Creating Databases Part II (Creating Forms)
Balancing the scales: Inequalities By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Using Digital Dashboards. Viewing the Sample Dashboard To view the sample dashboard: 1.In the upper-left corner of the Welcome page, click Administration.
Changing Camera Views! Part 1: Set Point of View to By Bella Onwumbiko under the direction of Professor Susan Rodger Duke University July 2013 Updates.
Skater World: Part Four By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June 1, 2009.
Integrating Components and Dynamic Text Boxes with the Animated Map– Lesson 101 Integrating Components and Dynamic Text Boxes with the Animated Map Lesson.
How Tall Are You? Introducing Functions for Alice 3 By Jenna Hayes under the direction of Professor Susan Rodger Duke University July 2008 Updates made.
Making Billboards By Deborah Nelson Duke University, Under the direction of Professor Susan Rodger, July 14, 2008.
Why use PowerPoint? Attracts attention Motivates DynamicAnimated Visual.
Chapter 8 Using Document Collaboration, Integration, and Charting Tools Microsoft Word 2013.
Under the direction of Susan Rodger
Creating a UFO Rescue Game in Alice
About the Mini Trivia Challenge
By Melissa Dalis Professor Susan Rodger Duke University June 2011
Class-Level Variables in Alice
Visual Basic.NET Windows Programming
5 In the Survey Options section, click an option to determine whether users' names will appear in survey results, and then whether users can respond to.
Chapter 2 Using Spreadsheets.
A Simple Quiz for Alice 3.2:
Understand Charts and SmartArt Graphics
5 In the Survey Options section, click an option to determine whether users' names will appear in survey results, and then whether users can respond to.
Microsoft Excel.
Comparing objects and changing color
Making a Timer This is an modification of the July 2008 timer tutorial by Jenna Hayes By Natalie Huffman Under the direction of Susan Rodger Duke University.
Asking User for an Answer Alice 3 Tricks in Mini Trivia (2/4)
Importing a PPT page as Billboard Alice 3 Tricks in Mini Trivia (3/4)
PowerPoint: Tables and Charts
Changing Color, Using Text Objects, and Random Selection in Alice
Enhancing Forms with OLE Fields, Hyperlinks, and Subforms
5 In the Survey Options section, click an option to determine whether users' names will appear in survey results, and then whether users can respond to.
Let's Race! Typing on the Home Row
Creating a UFO Rescue Game in Alice
Adding and Manipulating Objects
Memory Matching Challenge
A Simple Quiz for Alice 3.2:
Word offers a number of features to help you streamline the formatting of documents. In this chapter, you will learn how to use predesigned building blocks.
Princess & Dragon Part 2: Teaching a Dragon to Fly—Methods & Properties By Elizabeth Liang under the direction of Professor Susan Rodger Duke University.
Otasuke GP-EX! Chapter 5 Set Value Input Screen.
Creating a Powerpoint Presentation
Mathematical operators
Chapter 8 Using Document Collaboration and Integration Tools
under the direction of Professor Susan Rodger
Restricting Events Creating Conditional Events in Alice By Henry Qin
Alice Programming Assessment: Inheritance
Presentation transcript:

Building a Scorekeeper Alice 3 Tricks in Mini Trivia (1/4) 0  -5 20 85 By Vicki Zhang Duke University Under the direction of Professor Susan Rodger June 2017

About the Mini Trivia Challenge Mini Trivia is a four-question game created by Vicki Zhang. The author explains four useful topics involved in separate tutorials: scorekeeper asking user for an answer billboard multi-layered object clicking This tutorial explains how to build a scorekeeper. Start by downloading Mini Trivia_Challenge 1 Scorekeeper_Start

>> To get started Find and create a new TextModel. Set name to score, and initial value to 0.

Drag the text onto a clear spot (shown on next page) using the Default handle style. Resize it by changing the data directly or using the Resize handle style.

Tweak it to roughly this size and location. Color could be changed, if so inclined: ---------------------------- When satisfied, click on

One new Property for Score Goal: Create a property used to store the value of current score Purpose: To access the value easily How: Add new property for TextModel Value type: whole number Name: currentScore Initializer: 0

Note that we are enabling ALL text models this property and the procedures that we will create. >>

After you added the currentScore property, Alice automatically creates a procedure (setCurrentScore) and a function (getCurrentScore). We will use them soon. currentScore is a property of the TextModel, and used a parameter of this procedure

Three new Procedures for Score setScore addScore(#) reduceScore(#) Notes💡: addScore(5) will add 5 to the score, and reduceScore(10) will subtract 10 from the score. The # sign in the procedure is a placeholder demanding an input. Consider: If addScore did not have this input, Alice would not know how much to add. This is called a parameter.

Set Score Add TextModel Procedure and name it setScore This procedure is created for the purpose of setting the content of display

Set Score Drag in the setValue procedure >>Select “custom TextString” >>Press “Ok” directly. The result is shown below. Then click the tiny triangle on the right and select “” + ??? >> whole number >> currentScore

Set Score Completed

>> Add Score Create a second Procedure for the TextModel Name it addScore Add a parameter for this procedure **so that Alice knows how much to add** Name the parameter howMuch >>

Add Score Drag in the setCurrentScore procedure and select currentScore as the parameter in the dropdown menu. We want to add to the currentScore by howMuch The resulting formula should be: setCurrentScore to (currentScore + howMuch) Process shown on next page.

Add Score Completed The point of addScore is to update the value of currentScore and update the score displayed on the screen by calling setScore.

Reduce Score This is merely a numerically flipped version of addScore. Try it yourself first! Step-by-step guide on the next slide.

>> Reduce Score Create a second Procedure for the TextModel Name it reduceScore Add a parameter for this procedure **so that Alice knows how much to reduce** Name the parameter howMuch >>

Reduce Score Drag in the setCurrentScore procedure and select currentScore as the parameter in the dropdown menu. We want to subtract howMuch from the currentScore The resulting formula should be: setCurrentScore to (currentScore-howMuch) Process shown on next page.

Reduce Score Completed The point of reduceScore is to update the value of currentScore and update the score displayed on the screen by calling setScore.

Scorekeeper Completed! Now we just have to plug in the procedures to appropriate places in the game. You will have comments in Question A, Question C, Question D, and initializeEventListeners for guidance.

Example: Question A Step 1: Go to scene and you should find the scene procedures. Select questionA procedure.

Example: Question A Step 2: Select on the left tool bar TextModel—this.score, which is the visualized form of our scorekeeper

Example: Question A We can now see all procedures of TextModel on the left, including the ones we created. Drag in addScore into the doTogether box, either below or above the comment. Select custom whole number and type in 10.

Example: Question A Similarly, drag reduceScore in. Make sure you place it at the same level of the comment, i.e. under “else” and outside of do together. Select custom whole number and type in 5.

Finish them all for a complete game! Try it out! Run the game and click on the hammer, which corresponds to Question A. Comments for Questions B, C and D are found, respectively, in initializeEventListeners, questionC, questionD. Finish them all for a complete game!