Coder Social home page Coder Social logo

lightpathtrace's Introduction

How to run?

  • Clone!
  • Import Project into IntelliJ/ IDEA as JAVA project
  • Right click src/LightExit.java - Hit Run - the console should show the results

Main

  • src/LighExit.java
  • Comments added in class

Data structures

1. src/data/LightPath.java

This class contains the structure for the path of light.

  • coordinates has the (x,y) coordinates of the square through which light enters/ exits
  • laserOrientation has the orinetation (H,V) in which the laser beam enters or exits the maze

2. src/data/Mirrors.java

This class contains the structure for mirrors

  • coordinates has the (x,y) coordinates of the sqaure in which the mirror is placed
  • mirrorDirection has the direction (L,R) in which the mirror is placed
  • areBothSidesReflective is a boolean that specifies whether the mirror is reflective on both sides
  • reflectiveSide - if both sides are not reflective, this will contain the (L,R) refelctive side of the mirror

3. src/data/Maze.java

This class contains the maze datastructure

  • dimensions has the (x,y) dimension of the maze. x is the number of columns, y is the number of rows
  • mirrors is a collection of Mirrors that are placed in the squares belonging in the maze
  • entryPoint is the LightPath for the laser beam that enters the maze
  • exitPoint is the LightPath for the laser beam that exits the maze

lightpathtrace's People

Contributors

bimalpaul avatar

Watchers

James Cloos avatar  avatar

lightpathtrace's Issues

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.