Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ayoub0029/ant-farm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ant Farm Simulation

Overview

This Go program simulates an ant farm where ants navigate from a starting room to an ending room. The program reads the configuration from a specified text file, validates the format, constructs a graph of rooms and links, and finds all possible paths for the ants to take.

Features

  • Reads input data from a .txt file.
  • Validates the format of the input data.
  • Constructs a graph representation of rooms and links.
  • Finds all possible paths between the start and end rooms.
  • Distributes ants among paths based on their lengths.
  • Outputs the movement of ants in a structured format.

Input Format

The input file must follow this format: [number of ants] ##start [room name] [x-coordinate] [y-coordinate] [room name] [x-coordinate] [y-coordinate] ##end [room name] [x-coordinate] [y-coordinate] [room1]-[room2]

Usage

To run the program, use the following command in the terminal:

go run . <fileName.txt>

Authors

  • alahmami
  • rserraf
  • bbenskou
  • ahiti

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •