diff --git a/Shared/History.cs b/Shared/History.cs index 1835f98..50fcbcb 100644 --- a/Shared/History.cs +++ b/Shared/History.cs @@ -51,6 +51,7 @@ namespace SemiColinGames { } // This creates and populates a new array. It's O(n) and should probably only be used for tests. + // TODO: restrict visibility so that it can only be used by tests. public T[] ToArray() { T[] result = new T[items.Length]; for (int i = 0; i < items.Length; i++) { diff --git a/Shared/Line.cs b/Shared/Line.cs index 03446cd..2dcf8de 100644 --- a/Shared/Line.cs +++ b/Shared/Line.cs @@ -22,6 +22,7 @@ namespace SemiColinGames { int errorXY; // Error value e_xy from the PDF. // The size of the output is the size of the longer dimension, plus one. int resultSize = Math.Max(dx, -dy) + 1; + // TODO: an array or list should be passed in by the caller. var result = new Point[resultSize]; int i = 0; diff --git a/Shared/Player.cs b/Shared/Player.cs index c0fa3e3..379c926 100644 --- a/Shared/Player.cs +++ b/Shared/Player.cs @@ -83,6 +83,8 @@ namespace SemiColinGames { } bool harmedByCollision = false; + // TODO: pass in movePoints to Line.Rasterize instead of having that function allocate a + // new array. Point[] movePoints = Line.Rasterize(0, 0, (int) movement.X, (int) movement.Y); for (int i = 1; i < movePoints.Length; i++) { int dx = movePoints[i].X - movePoints[i - 1].X;