From a08bfacdfbdd9007bf31e70a1f00767bc290fc13 Mon Sep 17 00:00:00 2001 From: Gavin Tran Date: Tue, 24 Jan 2023 11:30:14 -0500 Subject: [PATCH] Conformed to Java conventions and updated GridLocation directory. --- src/main/java/chapter09/gridlocation/Main.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/java/chapter09/gridlocation/Main.java b/src/main/java/chapter09/gridlocation/Main.java index af0b871..20f912c 100644 --- a/src/main/java/chapter09/gridlocation/Main.java +++ b/src/main/java/chapter09/gridlocation/Main.java @@ -3,15 +3,12 @@ import info.gridworld.grid.Location; -public class Main -{ - public static void main(String[] args) - { - System.out.println("The distance between the two points is: " + Distance(new Location(9, 2), new Location(2, 2))); +public class Main { + public static void main(String[] args) { + System.out.println("The distance between the two points is: " + distance(new Location(9, 2), new Location(2, 2))); } - public static int Distance(Location loc1, Location loc2) - { + public static int distance(Location loc1, Location loc2) { int location1Row = loc1.getRow(); int location1Column = loc1.getCol(); int location2Row = loc2.getRow();