Skip to content

Latest commit

ย 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒฟ Botanic Garden Simulation

An interactive Java-based simulation of a botanical garden ecosystem. The project demonstrates the practical application of several Object-Oriented Design Patterns to manage complex state transitions and autonomous agent behavior. image

๐Ÿš€ Features

  • Autonomous Gardeners: Workers move around the garden, managing their energy levels and performing plant care tasks.
  • Dynamic Plant Life Cycle: Plants grow, get thirsty, or infested by weeds/pests in real-time.
  • Weather System: Changing weather conditions (Sunny, Rainy, Storm) directly affect plant hydration and gardener efficiency.
  • Interactive GUI: Custom 2D rendering using Java Swing with smooth animations and status bars.

๐Ÿ—๏ธ Design Patterns Used

  • State Pattern: Used for Gardener behavior (Idle, Traveling, Working, Returning) and Plant health states (Healthy, Thirsty, Weedy, Infested, Dead).
  • Strategy Pattern: Implements different gardener task assignment logic (e.g., ClosestHealthyGardenerStrategy).
  • Observer Pattern: Plants notify the garden manager about status changes to trigger task dispatches.
  • Factory Pattern: Decouples plant creation logic via PlantFactory.

๐Ÿ› ๏ธ Tech Stack

  • Language: Java
  • UI: Java Swing / AWT
  • Architecture: Pattern-driven development

About

A cute simulation of botanic garden using SOLID rules and many patterns c:

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages