- Clone!
- Import Project into IntelliJ/ IDEA as JAVA project
- Right click
src/LightExit.java
- Hit Run - the console should show the results
src/LighExit.java
- Comments added in class
This class contains the structure for the path of light.
coordinates
has the (x,y) coordinates of the square through which light enters/ exitslaserOrientation
has the orinetation (H,V) in which the laser beam enters or exits the maze
This class contains the structure for mirrors
coordinates
has the (x,y) coordinates of the sqaure in which the mirror is placedmirrorDirection
has the direction (L,R) in which the mirror is placedareBothSidesReflective
is a boolean that specifies whether the mirror is reflective on both sidesreflectiveSide
- if both sides are not reflective, this will contain the (L,R) refelctive side of the mirror
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 rowsmirrors
is a collection ofMirrors
that are placed in the squares belonging in the mazeentryPoint
is theLightPath
for the laser beam that enters the mazeexitPoint
is theLightPath
for the laser beam that exits the maze