LinkedIn principal author Doug Winnie describes how to add functionality between conditional tests and add functionality based on various logical conditions in your app. Doug also introduces the differences between class variables and method variables, introducing the concept of variable scope in Visual C#.
- [Voiceover] The app has the conditional test to determine…if there is a triple or double roll.…Now I need to update the app to have a score variable,…update the variable based on the result of the score,…and notify the player.…First, we need to create a new variable.…The score variable will be part of the class,…so we will define that at the top of the class…as an integer.…We'll set that to zero since that's the value of the score…at the beginning of the game.…We also need to change the layout a bit.…We need to add a text block to display the score…to the player and the result of the roll.…So to do that, we need to jump back to the…designal page of the app.…
Here, we need to create a new text block for the score.…We can call it score text.…Next, we can create another called win text.…With that done, we can now jump back…to the c-sharp code.…With the new text blocks, we can create a new method…to add to the constructor that can set the initial…text contents of them when the app first starts.…We can call it set up game.…
Author
Released
6/27/2016Finally, you'll experiment with your app to learn more about how Windows apps work, and then find out where to go next.
- Installing Visual Studio Community edition
- Working with C#, XAML, and the Windows SDK
- Getting a head start with starter templates
- Testing apps with device emulators
- Creating your first app
- Building interactions, game logic, and scoring
- Adding custom components
- Modifying design parameters in XAML
- Experimenting and updating the final app
Skill Level Beginner
Duration
Views
Related Courses
-
Introduction
-
Welcome1m 28s
-
Review of the exercise files1m 20s
-
-
1. Stuff to Know First
-
How app development works3m 16s
-
2. Get Set Up
-
Test your setup3m 53s
-
3. The Major Parts
-
Visual Studio3m 37s
-
C#1m 35s
-
XAML2m 2s
-
Windows 10 SDK1m 30s
-
Starter templates1m 12s
-
Emulators1m 39s
-
Hardware50s
-
Docs2m 29s
-
-
4. Make an App
-
What the app will do1m 43s
-
Create the solution1m 52s
-
Create basic controls6m 50s
-
Create variables4m 13s
-
Create a basic interaction5m 38s
-
Produce a result4m 37s
-
Create three dice7m 55s
-
Create game logic6m 26s
-
Create scoring4m 51s
-
Create a custom component3m 59s
-
Add a component to an app2m 22s
-
Rearrange display2m 25s
-
Add design4m 47s
-
Add manifest information3m 57s
-
-
5. Tinker with Your App
-
Change the rules1m 44s
-
Change the dice1m 49s
-
Change the design1m 17s
-
-
Conclusion
-
Where to go from here1m 6s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Create scoring