Skip to content

Commit 2d7f701

Browse files
committed
updated CoolMazeFile location
1 parent a834802 commit 2d7f701

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

src/main/java/org/teachingextensions/logo/utils/MazeUtils/CreateMazeBackgroundFile.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import javax.imageio.ImageIO;
1313

1414
import org.teachingextensions.approvals.lite.util.MySystem;
15-
import org.teachingextensions.approvals.lite.util.TestUtils;
1615
import org.teachingextensions.approvals.lite.writers.ComponentApprovalWriter;
1716
import org.teachingextensions.virtualproctor.ScreenCapture;
1817

@@ -73,16 +72,14 @@ public static void sendImageToDisk(BufferedImage scaledMazeBackground)
7372
{
7473
try
7574
{
76-
// TODO Fix null pointer here, n = 0 is a fake
77-
int n = 0;
78-
Component c = StdDraw.frame.getComponent(n);
75+
Component c = StdDraw.frame.getComponent(0);
7976
Graphics g = scaledMazeBackground.createGraphics();
8077
c.paint(g);
8178
g.dispose();
82-
//String filename = "C:\\temp\\CoolMazeBackground.png";
83-
String filename = "./CoolMazeBackground.png";
79+
String filename = "./src/main/resources/mazeBackground/CoolMazeBackground.png";
8480
ImageIO.write(scaledMazeBackground, "png", new File(filename));
85-
TestUtils.displayFile(filename);
81+
//TODO If you want to see the file that will be saved, uncomment the line below
82+
//TestUtils.displayFile(filename);
8683
}
8784
catch (Exception e)
8885
{
4.75 KB
Loading

0 commit comments

Comments
 (0)