Hardware Reference
In-Depth Information
elif choice == 3:
filename = raw_input("filename?")
scan3D(filename, roomx+1, roomy+1, roomz+1)
elif choice == 4:
filename = raw_input("filename?")
print3D(filename, roomx+1, roomy+1, roomz+1)
elif choice == 5:
scan3D("scantemp", roomx+1, roomy+1, roomz+1)
pos = mc.player.getTilePos()
print3D("scantemp", pos.x+1, pos.y, pos.z+1)
elif choice == 6:
cleanRoom()
elif choice == 7:
demolishRoom()
elif choice == 8:
anotherGo = False
Save your test program and run it. What happens? Figure 6-7 shows what happened
when I ran this program on my computer. You can see that the program is telling you
what it is doing—it is choosing a random item from the menu, then it is using the
function that will handle that menu option. As each function at the moment in your
program only prints out its name, that is all that you see. You will see a different
sequence of words on your screen to those in Figure 6-7 because the menu() function
chooses a random choice each time it is used.
FIGURE.6-7 The results of running your test program
Search WWH ::




Custom Search