Hardware Reference
In-Depth Information
Tuples are similar to lists that you have used in previous adventuresā€”the key
difference is that once a tuple has been created it can't be changed, unlike a
list where you can change it such as adding or removing items. In programming
terms things which can't be changed are known as immutable, whereas those
that can be changed are known as mutable. If you want to know more about
Python tuples visit www.tutorialspoint.com/python/python_tuples.htm.
Building the.River
Your next task is to build a river that runs the width of the arena. A river that's too
wide for the player to jump! Luckily, there is a bridge over it. Not so luckily, the bridge
moves backwards and forwards along the river, so the player needs to use careful tim-
ing to jump onto the bridge and off again on the other side (see FigureĀ 9-7).
If the player falls into the river he will be taken back to the start of the arena. You will
write the code to move the player back to the start in Part 3; for now, this section is
about building the river and the moving bridge.
FIGURE.9-7 The player must cross the river.
First you need to create the river itself by clearing away part of the arena floor and putting
a layer of water blocks at the bottom. You create the bridge by using MinecraftShape
and make it move it from side to side using a similar method to the one you used to make
the wall move up and down.
 
Search WWH ::




Custom Search