patterns in java

can any one help to write a java code using patterns for the below project
i'm not able to start the project plzzz help me

you will have to simulate the spawning of antfarms in a meadow, battles between ants of different species etc and finally one ant queen conquering all antfarms as per the functional and technical requirements detailed below. You need to implement this assignment in Java. If any of the technical requirements are not adhered to in your implementation, the assignment will not be evaluated.
Functional Requirements:
1. A meadow can have many ant farms in them. For this assignment, only ever allow one meadow to take place.
2. A meadow should be capable of spawning a logically unlimited number of antfarms.
3. An antfarm should be comprised of a network of antfarm rooms.
4. An antfarm should have rooms for spawning more ants.
5. Ants should be able to battle other ants. When they do, the loser of the battle should die (it's antfarm can no longer command it), and the winner of the battle should get the attributes of the ant.
6. An antfarm should only have one species of ant. Each species should have some kind of bonus to them. Perhaps they harvest food faster. Perhaps they have a higher chance to kill other ants.
7. If a member of an ant colony kills the queen of another colony, the killer's queen should assume control of the dead queen's population of ants. all ants should now also have the attributes of both species of ant. (So if one species was strong, and the other species was efficient, now both populations are merged into a single population that is both strong and efficient.)
8. Ants should have to rest every so often. When they do, they should consume food. An antfarm should be limited in capacity of how many ants can rest at a time based on the number of rooms (X amount per resting room).
9. The simulation should end when, at the end of a tick, there is 1 or less active colonies/queens. This means you should spawn at least 2 colonies before your first tick.
10. Rooms in the Antfarm should require a certain (probably large) number of worker-ticks to build. So, if it would take 1 worker 100 ticks to dig a room, it would take 50 workers 2 ticks, etc. But there should be a significant cost to building a room, since rooms determine how much you can rest. (This requirement added in spec revision 1.)
Technical Requirements: (Design patterns bolded)
1. The Meadow class MUST be a singleton.
2. An antfarm should be a built by building rooms into an antfarm. (Builder pattern)
3. Drones and Warriors should only be created with the factory pattern by AntRooms, and Queens by the factory pattern by Meadows for purposes of a new colony.
4. Use the decorator pattern to keep track of an ant's attributes.
5. The simulation should be tick-based. (Mediator pattern) Each tick, every ant (in a random order) should perform some action based on its surroundings. Drones should look for food, warriors should hunt enemies (or go back for food if hungry) and queens should spawn an egg.
Interface requirements:
The interface to the ant farm should be a command line interface with the following commands:
Summary I - should give a summary of colony I. A summary gives information about that colony.
Example summary 1 might give the following output:
Output:
Species: Killer
Workers: 14
Warriors: 10
Ant Kills: 18
Colony kills: 2 (2😛ansy 4:Gatherer)
Ticks alive: 143
Status: Alive
Example summary 2 might give the following output:
Output:
Species: Pansy
Workers: 4
Warriors: 0
Ant Kills: 2
Colony kills: 0
Ticks Alive: 25
Status: Killed by 1:Killer

Replies

You are reading an archived discussion.

Related Posts

i am trying to write and read a simple program using these codes. writing code seems to work fine,it prompts for data and after it terminates properly.but the reading code...
When exactly should we replace the bearings of vehicle wheels? How to know whether bearings are to be replaced? What exactly/How exactly ball bearings work in Cars and other vehicles?...
i m final year project please help me out in selecting some topics for my major project....
hi i want to decode a data(DAT) file of the game to see the source code of the game to fix it glitches and bug please help is there any...
hey friends, i need some new ideas related to Electrical and electronics group for my mini project i have some but we can't make them possible with this technology so...