GithubHelp home page GithubHelp logo

jraleman / 42.lem-in Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 3.7 MB

An "Hex" simulator, that prints the quickest way to get N ants across the farm. To be the first to arrive, ants will need to take the shortest path. They will also need to avoid traffic jams as well as walking all over their fellow ants.

Makefile 4.38% C 86.28% Shell 8.04% Roff 1.29%
hex lemin ecole42 c djikstra

42.lem-in's Introduction

École 42

Lem-in

An "Hex" simulator. lem-in is a program that prints the quickest way to get n ants across the farm. To be the first to arrive, ants will need to take the shortest path. They will also need to avoid traffic jams as well as walking all over their fellow ants.

Options

Flags Description
--ant (-a) Color the total number of ants.
--debug (-d) Prints step by step where the ants are moving, ant the number of moves required.
--help (-h) Display a message on how to use lem-in, and the available parameters.
--man (-m) Shows the lem-in man page
--path (-p) Color the paths from the map.
--room (-r) Color the rooms from the map.

Getting Started

Compiling

Run the following commands:

  • To compile
    • make
  • To remove objects:
    • make clean
  • To remove objects and binary file (program):
    • make fclean
  • To re-compile:
    • make re

Running

To run the program:

./lemin < path/to/map.txt

Screenshots

> Lem-in's Help message.

> Lem-in's Man page.

> Running lem-in with the ant, path, and room flag.

> Running lem-in's debug visualizer.

Bugs

  • Bonus doesn't work on Linux (but man page does).

42.lem-in's People

Contributors

jraleman avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.