Czoko_Smieciarka/Trunk/Components/CzokoŚmieciarka.AI_Naive/RoutePlanningEngine.cs
2019-04-21 01:28:38 +02:00

63 lines
1.9 KiB
C#

using CzokoŚmieciarka.DataModels.Enums;
using CzokoŚmieciarka.DataModels.Interfaces;
using CzokoŚmieciarka.DataModels.Interfaces.Road;
using CzokoŚmieciarka.DataModels.Interfaces.RoutePlanningEngine;
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
using CzokoŚmieciarka.DataModels.Models;
using CzokoŚmieciarka.DataModels.Models.Steps;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Czoko_Smieciarka.AI_Naive
{
public class RoutePlanningEngine : IRoutePlanningEngine
{
IGarbageCollector Collector { get; set; }
IGarbageCollector CollectorClone { get; set; }
object[,] Board { get; set; }
object[,] BoardClone { get; set; }
public IEnumerable<IStep> ReturnSteps()
{
throw new NotImplementedException();
}
public RoutePlanningEngine(object[,] board, IGarbageCollector collector)
{
this.Collector = collector;
this.CollectorClone = (IGarbageCollector) collector.Clone();
this.Board = board;
this.BoardClone = (object [,]) board.Clone();
}
IEnumerable<IStep> PossibleSteps(object[,] BoardClone, IGarbageCollector CollectorClone)
{
var x = CollectorClone.Coords.X;
var y = CollectorClone.Coords.Y;
var maxX = BoardClone.GetLength(0) - 1;
var maxY = BoardClone.GetLength(1) - 1;
var currentCollector = CollectorClone.Clone();
var Moves = new List<IStep>
{
new MoveStep(Direction.Left, CollectorClone),
new MoveStep(Direction.Right, CollectorClone),
new MoveStep(Direction.Up, CollectorClone),
new MoveStep(Direction.Down, CollectorClone)
}
}
}
}