Compare commits
11
Commits
7900d5bc2f
...
dd570cc07e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd570cc07e | ||
|
|
e2ac6e437d | ||
|
|
4d2d8f99f4 | ||
|
|
41cca317c7 | ||
|
|
e15fff6591 | ||
|
|
6da81801d4 | ||
|
|
9e0936e32c | ||
|
|
1ce9c4c408 | ||
|
|
3db9b0485d | ||
|
|
8ac780faeb | ||
|
|
579a791d6c |
@@ -1,45 +1,5 @@
|
|||||||
<h1>Sudoku</h1>
|
<h1>Sudoku</h1>
|
||||||
<p>A project worked on by Programming Club members at Salt Lake Community College.</p>
|
<p>A project worked on by Programming Club members at Salt Lake Community College.</p>
|
||||||
<h2>Features</h2>
|
|
||||||
<ul>
|
<h2>Installation</h2>
|
||||||
<li><s>Sudoku auto-solver</s></li><br>
|
|
||||||
<li>GUI:</li>
|
|
||||||
<ul>
|
|
||||||
<li>Navigation Bar (<a href="https://lucid.app/lucidchart/238344ab-de24-4be6-972a-70966379df86/edit?viewport_loc=-11%2C-11%2C2155%2C1156%2C0_0&invitationId=inv_870d3842-5217-4c56-a3e5-8fbb5f490c10">UML</a>):</li>
|
|
||||||
<ul>
|
|
||||||
<li>File dropdown for New, Open, and Save</li>
|
|
||||||
<li>Display elapsed time</li>
|
|
||||||
<li>Toggle between Note & Enter modes</li>
|
|
||||||
<li>Display hints</li>
|
|
||||||
<li>Open settings</li>
|
|
||||||
</ul>
|
|
||||||
<li>Sudoku Board:</li>
|
|
||||||
<ul>
|
|
||||||
<li>Differentiated initial values, likely by color</li>
|
|
||||||
<li>Highlight row, column, and box of a selected cell</li>
|
|
||||||
<li>Display noted values in cell's internal grid</li>
|
|
||||||
</ul>
|
|
||||||
<li>Number input</li>
|
|
||||||
<ul>
|
|
||||||
<li>Keyboard bindings & Vim-mode</li>
|
|
||||||
<li>Number pad on the side</li>
|
|
||||||
</ul>
|
|
||||||
</ul><br>
|
|
||||||
|
|
||||||
<li>File I/O:</li>
|
|
||||||
<ul>
|
|
||||||
<li>.sdku file standard</li>
|
|
||||||
<ul>
|
|
||||||
<li>Current values in cells</li>
|
|
||||||
<li>User "note" values in cells</li>
|
|
||||||
<li>Time spent on the puzzle</li>
|
|
||||||
<li>Number of mistakes</li>
|
|
||||||
<li>Puzzle solution</li>
|
|
||||||
</ul>
|
|
||||||
<li>.sdku file import</li>
|
|
||||||
<li>.sdku file export/saving</li>
|
|
||||||
<li>auto-saving</li>
|
|
||||||
</ul><br>
|
|
||||||
|
|
||||||
<li>Random .sdku generation</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
+1
-1
@@ -297,7 +297,7 @@ public class Nav extends JPanel {
|
|||||||
*/
|
*/
|
||||||
private void openFile(String filename) {
|
private void openFile(String filename) {
|
||||||
//file path is not working for everyone had to append src/ to run
|
//file path is not working for everyone had to append src/ to run
|
||||||
File f = new File("src/resources/" + filename + ".sdku");
|
File f = new File("resources/" + filename + ".sdku");
|
||||||
// If the file does not exist, print an error message and return.
|
// If the file does not exist, print an error message and return.
|
||||||
if(f == null || !f.exists() || f.isDirectory() || !f.canRead()) {
|
if(f == null || !f.exists() || f.isDirectory() || !f.canRead()) {
|
||||||
System.out.println(
|
System.out.println(
|
||||||
|
|||||||
@@ -185,8 +185,10 @@ public class Settings {
|
|||||||
fontName + ".ttf";
|
fontName + ".ttf";
|
||||||
else if(os.startsWith("mac"))
|
else if(os.startsWith("mac"))
|
||||||
fontFilepath = "/Library/Fonts/" + fontName + ".ttf";
|
fontFilepath = "/Library/Fonts/" + fontName + ".ttf";
|
||||||
else
|
else {
|
||||||
fontFilepath = "/usr/share/fonts/" + fontName + ".ttf";
|
fontName = "HackNerdFontMono-Regular";
|
||||||
|
fontFilepath = "/usr/share/fonts/TTF/" + fontName + ".ttf";
|
||||||
|
}
|
||||||
|
|
||||||
// Register the font with the GraphicsEnvironment.
|
// Register the font with the GraphicsEnvironment.
|
||||||
try {
|
try {
|
||||||
@@ -538,4 +540,4 @@ public class Settings {
|
|||||||
this.autoSaveFrequency = autoSaveFrequency;
|
this.autoSaveFrequency = autoSaveFrequency;
|
||||||
updateSettingsFile();
|
updateSettingsFile();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-6
@@ -2,15 +2,12 @@ function Run {
|
|||||||
param(
|
param(
|
||||||
[string]$flag
|
[string]$flag
|
||||||
)
|
)
|
||||||
javac *.java
|
javac -d bin *.java
|
||||||
java App $flag
|
java -cp bin App $flag
|
||||||
Remove-Item *.class
|
|
||||||
Remove-Item gui/*.class
|
|
||||||
Remove-Item gui/backend/*.class
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($args.Length -eq 1) {
|
if ($args.Length -eq 1) {
|
||||||
$flag = $args[0]
|
$flag = $args[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
Run $flag
|
Run $flag
|
||||||
|
|||||||
Regular → Executable
+42
-11
@@ -1,13 +1,44 @@
|
|||||||
run() {
|
function run() {
|
||||||
javac *.java
|
if [[ $# -eq 0 ]]; then
|
||||||
java App $1
|
# Compile the program
|
||||||
rm *.class
|
javac -d bin *.java
|
||||||
rm gui/*.class
|
java -cp bin App
|
||||||
rm gui/backend/*.class
|
rm -rf bin
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
"-c" | "--cli")
|
||||||
|
# Run the program in the CLI
|
||||||
|
# Compile the program
|
||||||
|
javac -d bin *.java
|
||||||
|
java -cp bin App -c
|
||||||
|
;;
|
||||||
|
|
||||||
|
"-b" | "--build")
|
||||||
|
# Compile the program
|
||||||
|
javac -d bin *.java
|
||||||
|
;;
|
||||||
|
|
||||||
|
"-j" | "--jar")
|
||||||
|
# Create a JAR file
|
||||||
|
jar cfe sudoku.jar App -C bin .
|
||||||
|
;;
|
||||||
|
|
||||||
|
"-h" | "--help")
|
||||||
|
echo "Usage: run.sh [OPTION]"
|
||||||
|
echo "Run the program"
|
||||||
|
echo
|
||||||
|
echo "Options:"
|
||||||
|
echo " -c, --cli Run the program in the CLI"
|
||||||
|
echo " -b, --build Compile the program"
|
||||||
|
echo " -j, --jar Create a JAR file"
|
||||||
|
echo " -h, --help Display this help message"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Invalid argument"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if($# -eq 1) then
|
run $@
|
||||||
FLAG=$1
|
|
||||||
fi
|
|
||||||
|
|
||||||
run $FLAG
|
|
||||||
|
|||||||
Reference in New Issue
Block a user