about summary refs log tree commit diff stats
path: root/js/games/nluqo.github.io/~bh/61a-pages/Volume1/Project3/small-world.scm
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2023-08-23 07:52:19 -0400
committerelioat <elioat@tilde.institute>2023-08-23 07:52:19 -0400
commit562a9a52d599d9a05f871404050968a5fd282640 (patch)
tree7d3305c1252c043bfe246ccc7deff0056aa6b5ab /js/games/nluqo.github.io/~bh/61a-pages/Volume1/Project3/small-world.scm
parent5d012c6c011a9dedf7d0a098e456206244eb5a0f (diff)
downloadtour-562a9a52d599d9a05f871404050968a5fd282640.tar.gz
*
Diffstat (limited to 'js/games/nluqo.github.io/~bh/61a-pages/Volume1/Project3/small-world.scm')
-rw-r--r--js/games/nluqo.github.io/~bh/61a-pages/Volume1/Project3/small-world.scm28
1 files changed, 28 insertions, 0 deletions
diff --git a/js/games/nluqo.github.io/~bh/61a-pages/Volume1/Project3/small-world.scm b/js/games/nluqo.github.io/~bh/61a-pages/Volume1/Project3/small-world.scm
new file mode 100644
index 0000000..dcd6bd1
--- /dev/null
+++ b/js/games/nluqo.github.io/~bh/61a-pages/Volume1/Project3/small-world.scm
@@ -0,0 +1,28 @@
+;;; small-world.scm
+;;; Miniature game world for debugging the CS61A adventure game project.
+;;; You can load this instead of adv-world.scm, and reload it quickly
+;;; whenever you change a class.
+
+;;; How to use this file:
+;;; If, for example, your person class doesn't work, and you do something
+;;; like (define Matt (instantiate person 'Matt)), and then fix your
+;;; person class definition, Matt is still bound to the faulty person
+;;; object from before.  However, reloading this file whenever you
+;;; change something should redefine everything in your world with the
+;;; currently loaded (i.e. most recent) versions of your classes.
+
+(define 61A-Lab (instantiate place '61A-Lab))
+(define Lounge (instantiate place 'Lounge))
+(can-go 61A-Lab 'up Lounge)
+(can-go Lounge 'down 61A-Lab)
+;;;  Hopefully you'll see more of the world than this in real life
+;;;  while you're doing the project!
+
+(define homework-box (instantiate thing 'homework-box))
+(ask 61A-Lab 'appear homework-box)
+
+(define Coke (instantiate thing 'Coke))
+(ask Lounge 'appear Coke)
+
+(define laba (instantiate person 'Lab-assistant 61A-Lab))
+