Giter Site home page Giter Site logo

shortest-path-algorithm's Introduction

Shortest path 2D algorithm. Walls are defined as set of line segments.
Points at wall ends are passable.

To build:
	gradle build

Data files are CSV describing one 2d-line per line:
 x1, y1, x2, y2
 

To run batch version: 
	java -jar build/libs/labyrinth-0.1.jar
	
Example:
 java -jar build/libs/labyrinth-0.1.jar data/box.txt 1 1 70 70
Output:
 1.0, 1.0, 10.0, 10.0
 10.0, 10.0, 50.0, 50.0
 50.0, 50.0, 70.0, 70.0

Example:
	java -jar build/libs/labyrinth-0.1.jar data/waterproof-box.txt 30 30 70 70
No output (no path found).	


To run GUI version:
	java -cp build/libs/labyrinth-0.1.jar petrglad.labyrinth.Board data/test-data1.txt
(data file is optional)

Keys:
	Mouse_left, Mouse_right - set start and end point
	Mouse_middle - clear paths
	Ctrl+Mouse_left - set new walls  
	Ctrl+S - save walls to file "saved-walls.txt"	

shortest-path-algorithm's People

Contributors

petrglad avatar

Watchers

James Cloos avatar Islam Abdelaziz 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.