We now describe the first programming framework in our curricular sequence, which will provide instruction in the use of the control structures of a programming language. Figure 6 provides an overview of the seven levels of this framework. Each of these levels progressively introduces new concepts, and correspondingly increases the architectural complexity of the machine. Programming challenges are chosen to require the player to master increasingly more sophisticated programming paradigms, so that by the 7th level, the player is completing a selection sort of an arbitrarily sized input. Our view of programming is that it entails, in part, the acquisition of a set of these paradigms or more colloquially, a bag of programming tricks that the programmer can utilize in appropriate situations. Examples of some of these programming tricks include finding the largest number in a sequence, swapping two numbers, and iterating through the cells of an array. All of the challenges, taken in sequence, are meant to gradually expose the player to a full set of programming language constructs, a more complete model of the underlying machine architecture, and the representation of data in the machine.
The first level, illustrated in Figure 6, introduces the game player to input and output. We present straightforward challenges here that only require the player to read numbers and print them; however, the player will begin to acquire an understanding of the movement of data in the underlying architecture and, in the third challenge of level one, the player will learn to read more data items than the number of registers in the underlying architecture. In the second level, the player learns how to utilize an if control structure to find the largest of two or three numbers and to do this even when the number of storage registers is less than the data set size, which requires storing the largest number so far via an assignment. In the third level, the player learns how to arrange numbers into a numeric sequence, which requires swapping two numbers. In the fourth level the player learns about the while statement and use of relational operators to form logical expressions. In the fifth level, the player learns the important loop control paradigms of looping a variable number of times controlled by a count, and looping until a sentinel value is reached. In the sixth level, the player learns how to use an array, and finally, in the seventh level, the player learns how to sort a sequence of numbers.