Minecraft Shape Game

In this class, we will play a Minecraft Minigame written to explore the shapes you have building in Minecraft. The rules of the games are:

  • To get a hit point, you need to hit a vertex with a sword
  • You can only hit a vertex if it is connected to the previous vertex along an edge
  • To complete the level you need to hit all the vertices in the polyhedron shape

When you complete a level, the path you took with hitting vertices is replaced by explodable TNT blocks. You can then explode the shape by hitting the TNT block!

The levels names in increasing order of difficulty are:

  • "TETRAHEDRON"
  • "OCTAHEDRON"
  • "CUBE"
  • "DODECAHEDRON"
  • "ICOSAHEDRON"

Good luck and have fun!

Start Minecraft and run the program cell below before you begin your tasks.


In [ ]:
import sys
sys.path.append('/home/pi/minecraft-programming')
import mini_game as pepgame

Level 0

Move to a place in your Minecraft world where you want to play the game and run the program below. Once you run the program, switch to Minecraft and play the game.


In [ ]:
game = pepgame.ShapeGame("TETRAHEDRON")
game.startGame()

Next Levels

Change the name of the shape in the program above to a more difficult level like "CUBE" and run the program again. Try to complete at least two levels.