Figure 1: An Example of Project 2 Screenshot (note that the positions of player, sandwich and
zombie might be di↵erent in your implementation).
Treasure Hunt Game
As said in Project 1, the player enters a tomb to search for a treasure box. The tomb is ﬁlled
with zombies, that the player needs to ﬁght before reaching the treasure. While the ﬁghting is
energy-consuming, the tomb is also ﬁlled with the nutritious foods to let the player regain strength.
There is only one player in the treasure hunt game. For Project 1, there is one zombie and one
sandwich. The character and function descriptions of the player, zombie and sandwich are outlined
Background should be rendered/drawn in the same way as Project 1.
There is only one player, and a number of other entities, zombies and sandwich, in the tomb that
the Player can interact with.
• Zombie and sandwich are stationary entity. See Project 1 for where the image
• Treasure: a stationary entity in the tomb. Its image is located at res/images/treasure.png.
Figure 2: Images of Characters in ShadowTreasure for Project 2. Note, I enlarge the Bullet in (e),
but it is just a small green dot when it’s drawn on the screen.
See Figure 2(d). There is only one treasure in ShadowTreasure. The ﬁnal goal of the player
is to reach/meet treasure. But, the treasure can be reached/met only if all zombies in
the tomb are killed. See Algorithm 1 for how to kill zombies.
Image ﬁle and attributes energy and step size are the same as Project 1. Note, you
still need to print the energy on the screen as in Project 1. In project, the player can
shoot the bullet to kill zombies.
• Bullet : a moving object in the tomb. Its image is located at res/images/shot.png.When
it’s shooting, the step size of bullet is 25. Each shot consumes energy 3. The same as the
player, bullet movements only happen in each tick.
The same as Project 1, the initial positions of the entities are determined by a environment ﬁle,
located at res/environment.csv. This is a comma-separated value (CSV) ﬁle with rows in the
following format for zombie and sandwich:
[Type], x-coordinate, y-coordinate
where the [Type] is either Zombie, Sandwich or Treasure and the x-coordinate and y-coordinate
show the location of the entity. A row in the ﬁle for the Player will have the format:
Player, x-coordinate, y-coordinate, energy level
where x-coordinate and y-coordinate show the initial location of the Player and the last column,
energy level, shows the starting energy level of the Player.
You must actually load the environment ﬁle—copying and pasting the data, for example, is
not allowed. You must load this environment ﬁle and create the corresponding entities in your
simulation. When we testing your code, we may use a di↵erent environment ﬁle. You should
assume that, in each environment ﬁle, there will be only one player, only one treasure and a
number of zombies and sandwiches. Note the number of zombies and sandwiches may
本网站支持淘宝 支付宝 微信支付 paypal等等交易。如果不放心可以用淘宝交易！
E-mail: firstname.lastname@example.org 微信:itcsdx