From 7ade1782d7425e1e6beeee16ef364cd389c9a853 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Fri, 2 Feb 2024 18:41:58 -0500 Subject: [PATCH] Modified Piece.java to fix any warnings and make value final. --- .idea/inspectionProfiles/Project_Default.xml | 8 ++++++++ src/Assignments/A1/models/Piece.java | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 .idea/inspectionProfiles/Project_Default.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..b96278e --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/src/Assignments/A1/models/Piece.java b/src/Assignments/A1/models/Piece.java index c3fce6d..ecdcc36 100644 --- a/src/Assignments/A1/models/Piece.java +++ b/src/Assignments/A1/models/Piece.java @@ -9,7 +9,7 @@ package Assignments.A1.models; public class Piece { private int loc; - private int value; + private final int value; /** * Creates a new piece with a specified location and value. @@ -17,8 +17,9 @@ public class Piece { * @precondition loc >= 0 & newLoc <= 8 * & value >= 1 & value <= 8 * @postcondition the piece is created. - * @param loc - * @param value + * + * @param loc the location of the piece. + * @param value the value of the piece. (FINAL) */ public Piece(int loc, int value) {