public void addLine(List <GameObject> lineRenderers, List <Vector3> linePoints, int numOfPoints) { LineDescription lineDescription = new LineDescription(lineRenderers, linePoints, numOfPoints); lineDescriptions.Add(lineDescription); hash += 1; }
private static Line CreateLine(GraphicsDevice device, Vector3 position, LineDescription edge, Color color) { var line = new Line(device, color, edge.A, edge.B) { Position = position }; line.Update(); return(line); }
private LineDescription FindBestLine() { LineDescription best = new LineDescription(); foreach (var c in Counters) { var d = Direction.Single; int length = c.LineLength(d, Game.Board); if (length > best.Length) { best.Length = length; best.StartCounter = c; best.Direction = d; } } return(best); }
private List <int> PossibleNextMoves(LineDescription line) { var moves = new List <int>(); switch (line.Direction) { case Direction.Down: moves.Add(line.StartCounter.Left); break; case Direction.Right | Direction.LeftDown | Direction.RightDown: moves.Add(line.StartCounter.Left - line.Length); moves.Add(line.StartCounter.Left + 1); break; } return(moves); }
//display details for line private string DisplayLineDescription(LineDescription line) { return(String.Format("{0}, \n\t\t{1}, \n\t\t{2}", line.LongName, line.Mode, line.Color)); }
private string DisplayLineDescription(string line) { LineDescription lineDescription = GetLineDescription(line); return(String.Format("{0}, \n\t\t{1}", lineDescription.LongName, lineDescription.Mode)); }