Lecture Prep: Starting up again
Copyright (c) 2017 Kathi Fisler
We’ll start with a review of the course logistics going forward. Take a look at the overview guide and come with questions (partly as a way for us to test out our technology).
1 Organizing Game States
Imagine that you were building a game that featured a robot and an alien. Which of the following two datatypes makes more sense for the data definition for the state of the game?
data GameState1: |
| robot(pos :: Posn) |
| alien(pos :: Posn) |
end |
|
data GameState2: |
| state(robot-pos :: Posn, alien-pos :: Posn) |
end |
Come to lecture with an opinion and thoughts on this. We will assume you’ve looked at this before lecture.