Updates TrianglePrinter to print onto a TileGrid.
package com.valkryst.VTerminal.printer;
-import com.valkryst.VTerminal.component.Component;
+import com.valkryst.VTerminal.TileGrid;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NonNull;
@@ -23,13 +23,13 @@ public class TrianglePrinter {
}
/**
- * Prints a triangle on a component using a set of points.
+ * Prints a triangle on a tile grid using a set of points.
*
* The algorithm requires exactly three points. If there are more than three
* points, the extra points are ignored.
*
- * @param component
- * The component.
+ * @param grid
+ * The grid.
*
* @param points
* The points.
@@ -38,15 +38,15 @@ public class TrianglePrinter {
* If there are fewer than three points.
*
* @throws NullPointerException
- * If the screen or points array is null.
+ * If the grid or points array is null.
*/
- public void print(final @NonNull Component component, @NonNull Point[] points) {
+ public void print(final @NonNull TileGrid grid, @NonNull Point[] points) {
if (points.length < 3) {
throw new IllegalArgumentException("A triangle requires three points to be drawn.");
}
points = new Point[]{points[0], points[1], points[2], points[0]};
- linePrinter.print(component, points);
+ linePrinter.print(grid, points);
}
/**
