show path with selected direction when resolved.
This commit is contained in:
40
java/org/artisanlogiciel/games/DirectionPosition.java
Normal file
40
java/org/artisanlogiciel/games/DirectionPosition.java
Normal file
@@ -0,0 +1,40 @@
|
||||
package org.artisanlogiciel.games;
|
||||
|
||||
/**
|
||||
DirectionPosition
|
||||
|
||||
record direction and position ( direction as defined in LabyModel ).
|
||||
**/
|
||||
public class DirectionPosition
|
||||
{
|
||||
private short direction;
|
||||
private Position position;
|
||||
|
||||
// (direction,position)
|
||||
DirectionPosition(short d, Position p)
|
||||
{
|
||||
direction=d;
|
||||
position=p;
|
||||
}
|
||||
|
||||
short getDirection()
|
||||
{
|
||||
return direction;
|
||||
}
|
||||
|
||||
Position getPosition()
|
||||
{
|
||||
return position;
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
if (position != null)
|
||||
{
|
||||
return position.toString();
|
||||
}
|
||||
return "?";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user