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>
|
||||
<p>A project worked on by Programming Club members at Salt Lake Community College.</p>
|
||||
<h2>Features</h2>
|
||||
<ul>
|
||||
<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>
|
||||
<h2>Installation</h2>
|
||||
</ul>
|
||||
|
||||
+1
-1
@@ -297,7 +297,7 @@ public class Nav extends JPanel {
|
||||
*/
|
||||
private void openFile(String filename) {
|
||||
//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(f == null || !f.exists() || f.isDirectory() || !f.canRead()) {
|
||||
System.out.println(
|
||||
|
||||
@@ -185,8 +185,10 @@ public class Settings {
|
||||
fontName + ".ttf";
|
||||
else if(os.startsWith("mac"))
|
||||
fontFilepath = "/Library/Fonts/" + fontName + ".ttf";
|
||||
else
|
||||
fontFilepath = "/usr/share/fonts/" + fontName + ".ttf";
|
||||
else {
|
||||
fontName = "HackNerdFontMono-Regular";
|
||||
fontFilepath = "/usr/share/fonts/TTF/" + fontName + ".ttf";
|
||||
}
|
||||
|
||||
// Register the font with the GraphicsEnvironment.
|
||||
try {
|
||||
|
||||
+2
-5
@@ -2,11 +2,8 @@ function Run {
|
||||
param(
|
||||
[string]$flag
|
||||
)
|
||||
javac *.java
|
||||
java App $flag
|
||||
Remove-Item *.class
|
||||
Remove-Item gui/*.class
|
||||
Remove-Item gui/backend/*.class
|
||||
javac -d bin *.java
|
||||
java -cp bin App $flag
|
||||
}
|
||||
|
||||
if ($args.Length -eq 1) {
|
||||
|
||||
Regular → Executable
+42
-11
@@ -1,13 +1,44 @@
|
||||
run() {
|
||||
javac *.java
|
||||
java App $1
|
||||
rm *.class
|
||||
rm gui/*.class
|
||||
rm gui/backend/*.class
|
||||
function run() {
|
||||
if [[ $# -eq 0 ]]; then
|
||||
# Compile the program
|
||||
javac -d bin *.java
|
||||
java -cp bin App
|
||||
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
|
||||
FLAG=$1
|
||||
fi
|
||||
|
||||
run $FLAG
|
||||
run $@
|
||||
|
||||
Reference in New Issue
Block a user