Search for tag: "input"

Zoom Dec. 8. Coroutines

Generators may seem like a weird detour for this late in the course. But in this presentation, we show how they are used in graphics and animation.Generators are a specific example of a concept known…

From  Hannah Lee on December 10th, 2020 11 plays

Lesson 28.7 Iterator Chaining

Generators take iterators as input, but they also produce one as output. In this video we show how to chain iterators together, doing complex operations on our data.

From  Hannah Lee on December 3rd, 2020 22 plays

Lesson 28.5 Generator Design

Now that we know how generators work, it is time to write our own. In this video we show how easy it is. We just take out experience with the accumulator pattern and replace the accumulator with a…

From  Hannah Lee on December 3rd, 2020 25 plays

Lesson 27.7 Advanced State Triggers

The state triggers we saw in the previous video were pretty simple. In this video, we talk about using a more complicated trigger: a double click. Double-clicking is more complicated because it needs…

From  Hannah Lee on November 30th, 2020 38 plays

Lesson 27.5 Mouse Input

In the previous video we primarily focused on keyboard input. Mouse input (called “touch” by kivy) is a little more difficult. In this video we talk about how mouse input works and how to…

From  Hannah Lee on November 30th, 2020 37 plays

Lesson 27.4 Application Input

The big difference between a game and a movie is the ability to respond to player input, be it from a mouse or a keyboard. In this video we show how to us the tools provided by the GameApp class to…

From  Hannah Lee on November 30th, 2020 39 plays

Lesson 27.1 The Application Loop

In order to understand the classes that you will use in the final assignment, you first need to understand how a game application works. In this video we lay out the big picture. We talk about the…

From  Hannah Lee on November 30th, 2020 49 plays

Lesson 26.4 While-Loop Patterns

In this video we introduce two new patterns for while-loops: using a goal condition and using a boolean tracking variable. We see how these patterns allow us to write functions that we could never…

From  Hannah Lee on November 12th, 2020 37 plays

Lesson 25.6 Complex Custom Error Types

When we were recording the video on custom error types, it ran quite long. So we decided to break it up into a second video. In this video we look at a slightly more complicated error type. We also…

From  Hannah Lee on November 12th, 2020 37 plays

Lesson 24.3 Dynamic Attribute Access

Types guarantee that an object supports a set of operations (methods) and has a certain set of attributes. However, in this video we show that we can actually get this information without typing an…

From  Hannah Lee on November 12th, 2020 32 plays

Lesson 16.8 Tuple Expansion (OPTIONAL)

This video introduces an advanced topic that is completely optional and will not appear on any exam. You might have noticed that some functions, like max can take an arbitrary number of arguments. In…

From  Hannah Lee on October 19th, 2020 12 plays

Lesson 16.7 For-Loops and Testing

Another control-structure means another video on testing. But if you have following the Rule of Numbers, you will discover that you have enough tests for your for-loop. Instead, as we show in this…

From  Hannah Lee on October 19th, 2020 27 plays

Lesson 14.1 Try-Except Statements

In this video we intrduce a new control structure: the try-except statement. As we will see, it looks very similar to an if-else statment with some important differences.

From  Hannah Lee on October 10th, 2020 23 plays

Lesson 8.3 Test Scripts

A good testing plan has many, many test cases, and it can be really tedious to keep testing a function. That is why it would be ideal if we could automate the process. In this video, we introduce the…

From  Hannah Lee on September 24th, 2020 23 plays