-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
13 lines (10 loc) · 1.04 KB
/
README
File metadata and controls
13 lines (10 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
hello!
I had design a simulator that will maintain an environment, which consists of a collection of patches arranged in a rectangular grid of arbitrary size. Each patch contains zero or more wood chips. A patch may be occupied by one or more workertermites or soldiertermites, which are mobile entities that live within the world and behave according to simple rules.
A WORKERTERMITE can pick up a wood chip from the patch that it is currently on, or drop a wood chip that it is carrying when the patch has a wood. Termites travel around the grid by moving randomly from their current patch to a neighbouring patch, in one of eight possible directions.
A SOLDIERTERMITE moves in a similar way to termites.
Usage:
1. Create a new Java Project with Eclipse,for example: TermiteSimulator;
2. Copy the code under src to TermiteSimulator/src;
3. GUI Mode: Right click the TermiteSimulator/src/gui/GraphDisplay.java and Select Run As Java Application;
Or
Text Mode: Right click the TermiteSimulator/src/simulator/Simulator.java and Select Run As Java Application;