Skip to content

CDFinch/TritonHacks2022

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 

Repository files navigation

TritonHacks2022 Project - Fish Simulation

Description

We coded a fish simulation where there are three types of fish: Goldfish, Tropical Fish, and Sharks. The simulation initally starts with 20 goldfish, 5 tropical fish, and 1 shark. As long as there are two fish of the same type, new fish are born. When the tropical fish collides with a goldfish, the tropical fish "eats" the goldfish and the goldfish dissapears. When the shark collides with a tropical fish, the shark will eat that fish. The background of the simulation is a coral reef.

Small Goldfish

Goldfish

Tropical Fish

Tropical Fish

Apex Predator Shark

Sharks

Coral Reef Background Reef

Full Simulation Full Simulation

The Ecosystem Statistics are located along the right of the frame, with catergories for the amount of kills held by a specific species as well as the total number of any given species.

The fish are coded to move randomly and switch directions at random times.

The player can also interfere with the simulation and decide to spawn certain fish whenever they want by pressing buttons. Press the type of fish you want to spawn, and then press the "spawn" button. By spawning certain fish the user will notice how quickly the ecosystem may be able to fall apart, by adding even a single shark, the tropical fish population could be eradicated, leaving no predators for the goldfish leading to extreme overpopulation and no food for the sharks leading to death. If too many tropical fish are added, the player can notice an eradication of the goldfish population, this in turn creates massive issues for the ecosystem, as now the tropical fish cannot feed, leading to death, and the sharks being unable to feed, again leading to death.

With this simulation it is possible to get an insight on the effect of human interaction on aquatic ecosystems. Not only can the humans completely unbalance the ecosystem, but also have the ability to reintroduce species and restore balance to the ecosystem if some random circumstance causes issues.

Additionally there are buttons to speed up the overall speed of the simulation, although it has been seen to be inconsitant, not fully debugged and generally not as refined as desired and we do not reccomend excessive use of the feature.

Code and Format

This simulation was coded in the Java Language in the Eclipse IDE, It is shipped and exported as a runnable Java Executable for use on any Java supported Platform.

The resolution size of the UI interface is 1300 X 650 pixels.

Many different Java Libraries were used, including AWT, Util, and Swing, in order to implement graphics and logic calculations for velocity and timing.

Authors and Contributors

William Pan - williamlpan22@gmail.com

Zachary Brower - zbrower03@gmail.com

Project Won 3rd Place

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages