39 lines
889 B
C#
39 lines
889 B
C#
using HightechICT.Amazeing.Client.Rest;
|
|
|
|
namespace Bobo.Systems.Maze.Console.Model
|
|
{
|
|
public class MazeTile : PossibleActionsAndCurrentScore
|
|
{
|
|
public int X { get; set; } = 0;
|
|
public int Y { get; set; } = 0;
|
|
public bool HasBeenVisited { get; set; }
|
|
|
|
public MazeTile SetLocation(MazeTile source, Direction direction)
|
|
{
|
|
X = source.X;
|
|
Y = source.Y;
|
|
|
|
switch (direction)
|
|
{
|
|
case Direction.Up:
|
|
X++;
|
|
break;
|
|
|
|
case Direction.Down:
|
|
X--;
|
|
break;
|
|
|
|
case Direction.Right:
|
|
Y++;
|
|
break;
|
|
|
|
case Direction.Left:
|
|
Y--;
|
|
break;
|
|
}
|
|
|
|
return this;
|
|
}
|
|
}
|
|
}
|