Lab 9: No Step on Snek
Implement this lab with the Beginning Student Language with LIST ABBREVIATIONS.
Make sure you follow The Style we use for the {B,I,A}SL{,+} languages in this class.
Choose the initial Head and Hands, and get started!
List Abbreviations
In order to get comfortable with list abbreviations, complete the following finger exercises.
Ex 1: Using the cons and '() notation, create a list with the elements 1, 2, 3, 4.
Ex 2: Using the list notation, create a list with the elements 1, 2, 3, 4.
Ex 3: Using the cons and '() notation, create a list with the elements, which are themselves, 1, 2, 3, 4; "a", "b", "c"; and 6, 7.
Ex 4: Using the list notation, create a list with the elements, which are themselves lists, 1, 2, 3, 4; "a", "b", "c"; and 6, 7.
Ex 5: Using the cons and '() notation, create a list with the elements (cons 1 '()), '(), and 4.
Ex 6: Using the list notation, create a list with the elements (cons 1 '()), '(), and 4.
Ex 7: What are the elements of this list (list 1 2 3 4)?
Ex 8: What are the elements of this list (cons 1 (cons 2 (cons 3 (cons 4 '()))))?
Ex 9: What are the elements of this list (cons (cons 1 '()) (cons #false (cons (cons "a" (cons "b" '())) (cons '() '()))))?
List Abbreviations
Swap Head and Hands!
Ex 10: Starting from the code (snake.0.rkt) we designed in class, finish these simple version of the Snake game.
Ex 11: Refine the Snake game to use an arbitrary number of eggs that always appear in the Snake’s former path.