Hi i was hoping someone would be able to give me some tips and advance
how to go about this task.  I have no idea what to do, where to start
so any help would be grateful.  I have searched online but have found
no help.  You guys are my last resort

Here it is

Task
Write a multithreaded Java program which implements a simple
multiplayer labyrinth game called
Diamond Mine. More precisely, the game it is a multiagent simulation
game without human players.
You will be given the specification of an XML file format for two‐
dimensional mazes. Your program needs
to load a maze from a user‐specified file which conforms to this file
format. A maze initially contains
walls (consisting of rocks), diamonds, and a tool store. Your program
should place a number of
automated players randomly at empty positions in the maze. Each player
should try to collect as many
diamonds as possible and then find the exit of the maze before the
game is over. The game ends after a
given number of minutes or when all players have left the maze
(whichever occurs first).
Each player has the goal to mine as many diamonds as possible as fast
as possible. But from your point of
view, the goal is to design the software and the players in order to
maximize the total number of mined
diamonds before the game ends (so you can see yourself in the role of
the owner of the diamond mine).


Additional requirements
1. Your program should have a graphical user interface (GUI) which
shows at all times the complete
maze, including the current positions of all players and diamonds, the
position of the tool store,
the number of hammers and chisels which are currently available in the
tool store, the
possessions of each player (diamonds, tools), whether the hammer and/
or the chisel a player
currently has are broken or not, the exit of the maze, and the
countdown (number of seconds
left until the game is over). At the end of the game, display the
total number of mined
diamonds and the most successful player(‐s).

2. The GUI should provide buttons for starting, stopping and pausing/
continuing a game. Pausing
stops temporarily all player and pauses the countdown until the user
continues the game.
Stopping resets the countdown and the position of all players,
diamonds and tools to their
initial state.

3. Furthermore, the GUI should have the following functionality:
Load a maze from an XML file specified by the user. If need be, stop
the current game first.
Initially, the newly loaded maze does not contain any players.
Let the user specify the number of players (>=1). If need be, stop the
current game first.
Place the players randomly at free positions in the maze. If the maze
already contains
players, remove these first.
Set the maximum duration of the game (in minutes).
Set a “step delay” (see below).
Quit the program.

4. A maze consists of m x n positions. The size of the maze is
specified in the XML file of the maze.
Each position in the maze is either empty or occupied by a wall (a
rock), a diamond, a player,
the tool store, or the exit. There cannot be multiple things or
players at the same position, with
one exception: there can be multiple players in the tool store at the
same time.

5. Your program needs to work with any maze which conforms to the
given maze file specification,
not just with the given example maze files. You don’t have to design
mazes yourself, but you
are strongly encouraged to do so, in order to test your program.
Markers will use mazes which
are not given to you in order to test your software.

6. A player can only see the object (empty space, a rock, a diamond,
another player, the tool store,
the exit) which is currently directly in front of him (i.e., at the
next position in front of the player). He is also at any time informed
about the coordinates of his current position, how many seconds remain
until the game is over, the “step delay” (see below), the size of the
maze (m x n), and the coordinates of the tool store. If the player is
inside the tool store, he is also informed about the number of hammers
and chisels currently available there.
Players shall not be given any further information about the map.
Especially players should not be told the number of diamonds in the
maze, and they should not be given a map of the maze or the position
of the exit.

7. A player can only perform the following moves and operations:
look at the position directly (one step) in front of him,
turn to the right or the left (i.e., do a 90 degrees turn),
pick up a diamond from the position directly in front of him, provided
he has both a hammer and a chisel and both tools are not yet broken
(see below),
move to an empty space directly in front of him,
move into the tool store, provided it is directly in front of him,
pick up a hammer, provided the player is inside of the tool store, a
hammer is available there, and the player is not yet in the possession
of a hammer,
pick up a chisel, provided the player is inside of the tool store, a
chisel is available there, and the player is not yet in the possession
of a chisel,
return a hammer, provided the player is inside the tool store (tools
cannot be dropped anywhere else),
return a chisel, provided the player is inside the tool store (tools
cannot be dropped anywhere else),
leave the maze, provided the exit is directly in front of him and the
player is not in the possession of a hammer or a chisel.

The user should be able to set a ”step delay” (in milliseconds) which
specifies how long each player needs to pause after each of his moves,
in order to make the game observable by a human.

8. Diamonds can only be picked up if the player has both an intact
hammer and an intact chisel. A
limited number of hammers and chisels are available for free in the
tool store. Each time a
player picks up a hammer or a chisel there, the number of available
hammers resp. chisels is
decreased. The position of the tool store is specified in the maze
file and known to all players
from the game start on. Initially, players don’t have any tools, so in
order to be able to pick up
diamonds, they need to visit the tool store first. Before they leave
the maze, they must visit the
tool store and return hammer and chisel.
A certain player can use a certain hammer or a certain chisel exactly
5 times (i.e., for picking up
5 diamonds) before this tool breaks. If a tool is broken, the player
must at once bring it back to
the tool store and drop it there. The tool is then mended by the tool
store. Mending shall take a
random amount of time (0‐5 sec). Only after the tool has been mended,
it is again available for
all players (not just the player who brought it back).

It is possible to pick up or return a hammer from/to the tool store
separately from a chisel.

9. The players need to run simultaneously (using multithreading) and
fully automatically. All players
start at the same time, from random positions.

10. Every player should be able to reach the exit if he is given
enough time and a way out exists for
this player (but if the maximum duration of the game is rather short,
possibly not all players will
reach the exit). Players should not block each other. Remember that
you are in the role of the
mine owner.

11. Your program code needs to compile and run without problems when
we use the Java 5 JDK
installed on the BUCS machines using the command line interface (i.e.,
Sun’s javac and java
tools). Furthermore, your program needs to work without any additional
libraries (packages) or
tools except of what is included in the Java 5 JDK.

12. You need to include a README file (either plain text or pdf) which
explains how to use your
program.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Java 
EE (J2EE) Programming with Passion!" group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to