diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..c518d19 Binary files /dev/null and b/.DS_Store differ diff --git a/SOURCE/Bombs/Bomb.png b/SOURCE/Bombs/Bomb.png deleted file mode 100644 index a5fe619..0000000 Binary files a/SOURCE/Bombs/Bomb.png and /dev/null differ diff --git a/SOURCE/Bombs/Bomb0.png b/SOURCE/Bombs/Bomb0.png deleted file mode 100644 index 28eed0e..0000000 Binary files a/SOURCE/Bombs/Bomb0.png and /dev/null differ diff --git a/SOURCE/Bombs/Bomb1.png b/SOURCE/Bombs/Bomb1.png deleted file mode 100644 index 01b03ab..0000000 Binary files a/SOURCE/Bombs/Bomb1.png and /dev/null differ diff --git a/SOURCE/Bombs/Bomb10.png b/SOURCE/Bombs/Bomb10.png deleted file mode 100644 index f39b541..0000000 Binary files a/SOURCE/Bombs/Bomb10.png and /dev/null differ diff --git a/SOURCE/Bombs/Bomb2.png b/SOURCE/Bombs/Bomb2.png deleted file mode 100644 index d091e3e..0000000 Binary files a/SOURCE/Bombs/Bomb2.png and /dev/null differ diff --git a/SOURCE/Bombs/Bomb3.png b/SOURCE/Bombs/Bomb3.png deleted file mode 100644 index 0cd107c..0000000 Binary files a/SOURCE/Bombs/Bomb3.png and /dev/null differ diff --git a/SOURCE/Bombs/Bomb4.png b/SOURCE/Bombs/Bomb4.png deleted file mode 100644 index 5a7476f..0000000 Binary files a/SOURCE/Bombs/Bomb4.png and /dev/null differ diff --git a/SOURCE/Bombs/Bomb5.png b/SOURCE/Bombs/Bomb5.png deleted file mode 100644 index d7879c0..0000000 Binary files a/SOURCE/Bombs/Bomb5.png and /dev/null differ diff --git a/SOURCE/Bombs/Bomb6.png b/SOURCE/Bombs/Bomb6.png deleted file mode 100644 index 8e1edfa..0000000 Binary files a/SOURCE/Bombs/Bomb6.png and /dev/null differ diff --git a/SOURCE/Bombs/Bomb7.png b/SOURCE/Bombs/Bomb7.png deleted file mode 100644 index 9c21463..0000000 Binary files a/SOURCE/Bombs/Bomb7.png and /dev/null differ diff --git a/SOURCE/Bombs/Bomb8.png b/SOURCE/Bombs/Bomb8.png deleted file mode 100644 index bd9ec16..0000000 Binary files a/SOURCE/Bombs/Bomb8.png and /dev/null differ diff --git a/SOURCE/Bombs/Bomb9.png b/SOURCE/Bombs/Bomb9.png deleted file mode 100644 index 4ac75a9..0000000 Binary files a/SOURCE/Bombs/Bomb9.png and /dev/null differ diff --git a/SOURCE/Bombs/Bomb_1_Explosion_000.png b/SOURCE/Bombs/Bomb_1_Explosion_000.png deleted file mode 100644 index c07c959..0000000 Binary files a/SOURCE/Bombs/Bomb_1_Explosion_000.png and /dev/null differ diff --git a/SOURCE/Bombs/Bomb_1_Explosion_001.png b/SOURCE/Bombs/Bomb_1_Explosion_001.png deleted file mode 100644 index 53e45ae..0000000 Binary files a/SOURCE/Bombs/Bomb_1_Explosion_001.png and /dev/null differ diff --git a/SOURCE/Bombs/Bomb_1_Explosion_002.png b/SOURCE/Bombs/Bomb_1_Explosion_002.png deleted file mode 100644 index bb2963c..0000000 Binary files a/SOURCE/Bombs/Bomb_1_Explosion_002.png and /dev/null differ diff --git a/SOURCE/Bombs/Bomb_2_Explosion_001.png b/SOURCE/Bombs/Bomb_2_Explosion_001.png deleted file mode 100644 index 12859f7..0000000 Binary files a/SOURCE/Bombs/Bomb_2_Explosion_001.png and /dev/null differ diff --git a/SOURCE/Bombs/Bomb_2_Explosion_002.png b/SOURCE/Bombs/Bomb_2_Explosion_002.png deleted file mode 100644 index 843a833..0000000 Binary files a/SOURCE/Bombs/Bomb_2_Explosion_002.png and /dev/null differ diff --git a/SOURCE/Meteors/Meteor_01.png b/SOURCE/Meteors/Meteor_01.png deleted file mode 100644 index 5fe6ba9..0000000 Binary files a/SOURCE/Meteors/Meteor_01.png and /dev/null differ diff --git a/SOURCE/Meteors/Meteor_010.png b/SOURCE/Meteors/Meteor_010.png deleted file mode 100644 index a6bd444..0000000 Binary files a/SOURCE/Meteors/Meteor_010.png and /dev/null differ diff --git a/SOURCE/Meteors/Meteor_02.png b/SOURCE/Meteors/Meteor_02.png deleted file mode 100644 index 200383a..0000000 Binary files a/SOURCE/Meteors/Meteor_02.png and /dev/null differ diff --git a/SOURCE/Meteors/Meteor_03.png b/SOURCE/Meteors/Meteor_03.png deleted file mode 100644 index 2f5da5d..0000000 Binary files a/SOURCE/Meteors/Meteor_03.png and /dev/null differ diff --git a/SOURCE/Meteors/Meteor_04.png b/SOURCE/Meteors/Meteor_04.png deleted file mode 100644 index 6f31837..0000000 Binary files a/SOURCE/Meteors/Meteor_04.png and /dev/null differ diff --git a/SOURCE/Meteors/Meteor_05.png b/SOURCE/Meteors/Meteor_05.png deleted file mode 100644 index 177c4bd..0000000 Binary files a/SOURCE/Meteors/Meteor_05.png and /dev/null differ diff --git a/SOURCE/Meteors/Meteor_06.png b/SOURCE/Meteors/Meteor_06.png deleted file mode 100644 index 8ef6bd1..0000000 Binary files a/SOURCE/Meteors/Meteor_06.png and /dev/null differ diff --git a/SOURCE/Meteors/Meteor_07.png b/SOURCE/Meteors/Meteor_07.png deleted file mode 100644 index c3b3adb..0000000 Binary files a/SOURCE/Meteors/Meteor_07.png and /dev/null differ diff --git a/SOURCE/Meteors/Meteor_08.png b/SOURCE/Meteors/Meteor_08.png deleted file mode 100644 index 752fb0b..0000000 Binary files a/SOURCE/Meteors/Meteor_08.png and /dev/null differ diff --git a/SOURCE/Meteors/Meteor_09.png b/SOURCE/Meteors/Meteor_09.png deleted file mode 100644 index 403b598..0000000 Binary files a/SOURCE/Meteors/Meteor_09.png and /dev/null differ diff --git a/SOURCE/Missile/Missile_3_Explosion_000.png b/SOURCE/Missile/Missile_3_Explosion_000.png deleted file mode 100644 index 7057e53..0000000 Binary files a/SOURCE/Missile/Missile_3_Explosion_000.png and /dev/null differ diff --git a/SOURCE/Missile/Missile_3_Explosion_001.png b/SOURCE/Missile/Missile_3_Explosion_001.png deleted file mode 100644 index 54cd9b5..0000000 Binary files a/SOURCE/Missile/Missile_3_Explosion_001.png and /dev/null differ diff --git a/SOURCE/Missile/Missile_3_Explosion_002.png b/SOURCE/Missile/Missile_3_Explosion_002.png deleted file mode 100644 index 9d5084a..0000000 Binary files a/SOURCE/Missile/Missile_3_Explosion_002.png and /dev/null differ diff --git a/SOURCE/Missile/Missile_3_Explosion_003.png b/SOURCE/Missile/Missile_3_Explosion_003.png deleted file mode 100644 index f692977..0000000 Binary files a/SOURCE/Missile/Missile_3_Explosion_003.png and /dev/null differ diff --git a/SOURCE/Missile/Missile_3_Explosion_004.png b/SOURCE/Missile/Missile_3_Explosion_004.png deleted file mode 100644 index 5a7476f..0000000 Binary files a/SOURCE/Missile/Missile_3_Explosion_004.png and /dev/null differ diff --git a/SOURCE/Missile/Missile_3_Explosion_005.png b/SOURCE/Missile/Missile_3_Explosion_005.png deleted file mode 100644 index 2464e42..0000000 Binary files a/SOURCE/Missile/Missile_3_Explosion_005.png and /dev/null differ diff --git a/SOURCE/Missile/Missile_3_Explosion_006.png b/SOURCE/Missile/Missile_3_Explosion_006.png deleted file mode 100644 index 949df40..0000000 Binary files a/SOURCE/Missile/Missile_3_Explosion_006.png and /dev/null differ diff --git a/SOURCE/Missile/Missile_3_Explosion_007.png b/SOURCE/Missile/Missile_3_Explosion_007.png deleted file mode 100644 index 4ac75a9..0000000 Binary files a/SOURCE/Missile/Missile_3_Explosion_007.png and /dev/null differ diff --git a/SOURCE/Missile/Missile_3_Explosion_008.png b/SOURCE/Missile/Missile_3_Explosion_008.png deleted file mode 100644 index f39b541..0000000 Binary files a/SOURCE/Missile/Missile_3_Explosion_008.png and /dev/null differ diff --git a/SOURCE/Missile/Missile_3_Flying_000.png b/SOURCE/Missile/Missile_3_Flying_000.png deleted file mode 100644 index 45a4f49..0000000 Binary files a/SOURCE/Missile/Missile_3_Flying_000.png and /dev/null differ diff --git a/SOURCE/Missile/Missile_3_Flying_001.png b/SOURCE/Missile/Missile_3_Flying_001.png deleted file mode 100644 index 155ee70..0000000 Binary files a/SOURCE/Missile/Missile_3_Flying_001.png and /dev/null differ diff --git a/SOURCE/Missile/Missile_3_Flying_002.png b/SOURCE/Missile/Missile_3_Flying_002.png deleted file mode 100644 index 45a4f49..0000000 Binary files a/SOURCE/Missile/Missile_3_Flying_002.png and /dev/null differ diff --git a/SOURCE/Missile/Missile_3_Flying_003.png b/SOURCE/Missile/Missile_3_Flying_003.png deleted file mode 100644 index 8871508..0000000 Binary files a/SOURCE/Missile/Missile_3_Flying_003.png and /dev/null differ diff --git a/SOURCE/Missile/Missile_3_Flying_004.png b/SOURCE/Missile/Missile_3_Flying_004.png deleted file mode 100644 index 45a4f49..0000000 Binary files a/SOURCE/Missile/Missile_3_Flying_004.png and /dev/null differ diff --git a/SOURCE/Missile/Missile_3_Flying_005.png b/SOURCE/Missile/Missile_3_Flying_005.png deleted file mode 100644 index 269228f..0000000 Binary files a/SOURCE/Missile/Missile_3_Flying_005.png and /dev/null differ diff --git a/SOURCE/Missile/Missile_3_Flying_006.png b/SOURCE/Missile/Missile_3_Flying_006.png deleted file mode 100644 index 45a4f49..0000000 Binary files a/SOURCE/Missile/Missile_3_Flying_006.png and /dev/null differ diff --git a/SOURCE/Missile/Missile_3_Flying_007.png b/SOURCE/Missile/Missile_3_Flying_007.png deleted file mode 100644 index 6e6af39..0000000 Binary files a/SOURCE/Missile/Missile_3_Flying_007.png and /dev/null differ diff --git a/SOURCE/Missile/Missile_3_Flying_008.png b/SOURCE/Missile/Missile_3_Flying_008.png deleted file mode 100644 index 45a4f49..0000000 Binary files a/SOURCE/Missile/Missile_3_Flying_008.png and /dev/null differ diff --git a/SOURCE/Missile/Missile_3_Flying_009.png b/SOURCE/Missile/Missile_3_Flying_009.png deleted file mode 100644 index a3f6289..0000000 Binary files a/SOURCE/Missile/Missile_3_Flying_009.png and /dev/null differ diff --git a/SOURCE/bg1.jpg b/SOURCE/bg1.jpg deleted file mode 100644 index c1baf1a..0000000 Binary files a/SOURCE/bg1.jpg and /dev/null differ diff --git a/SOURCE/bg2.png b/SOURCE/bg2.png deleted file mode 100644 index 45b0105..0000000 Binary files a/SOURCE/bg2.png and /dev/null differ diff --git a/SOURCE/planet1.png b/SOURCE/planet1.png deleted file mode 100644 index 1e00edf..0000000 Binary files a/SOURCE/planet1.png and /dev/null differ diff --git a/SOURCE/planet2.png b/SOURCE/planet2.png deleted file mode 100644 index bc4c762..0000000 Binary files a/SOURCE/planet2.png and /dev/null differ diff --git a/SOURCE/planet3.png b/SOURCE/planet3.png deleted file mode 100644 index ddff743..0000000 Binary files a/SOURCE/planet3.png and /dev/null differ diff --git a/SOURCE/planet4.png b/SOURCE/planet4.png deleted file mode 100644 index 3f174fe..0000000 Binary files a/SOURCE/planet4.png and /dev/null differ diff --git a/SOURCE/planet5.png b/SOURCE/planet5.png deleted file mode 100644 index 1ca3936..0000000 Binary files a/SOURCE/planet5.png and /dev/null differ diff --git a/SOURCE/planet6.png b/SOURCE/planet6.png deleted file mode 100644 index b28df15..0000000 Binary files a/SOURCE/planet6.png and /dev/null differ diff --git a/SOURCE/planet7.png b/SOURCE/planet7.png deleted file mode 100644 index 944ab8c..0000000 Binary files a/SOURCE/planet7.png and /dev/null differ diff --git a/SOURCE/planet8.png b/SOURCE/planet8.png deleted file mode 100644 index 2944d65..0000000 Binary files a/SOURCE/planet8.png and /dev/null differ diff --git a/SOURCE/planet9.png b/SOURCE/planet9.png deleted file mode 100644 index 5738132..0000000 Binary files a/SOURCE/planet9.png and /dev/null differ diff --git a/SOURCE/space1.png b/SOURCE/space1.png deleted file mode 100644 index 9783f32..0000000 Binary files a/SOURCE/space1.png and /dev/null differ diff --git a/SOURCE/spaceship.png b/SOURCE/spaceship.png deleted file mode 100644 index d406623..0000000 Binary files a/SOURCE/spaceship.png and /dev/null differ diff --git a/SOURCE/spaceship1.png b/SOURCE/spaceship1.png deleted file mode 100644 index 1299e3d..0000000 Binary files a/SOURCE/spaceship1.png and /dev/null differ diff --git a/SOURCE/sun1.png b/SOURCE/sun1.png deleted file mode 100644 index 698c739..0000000 Binary files a/SOURCE/sun1.png and /dev/null differ diff --git a/assets/minigame2/.DS_Store b/assets/minigame2/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/assets/minigame2/.DS_Store differ diff --git a/assets/minigame2/background.png b/assets/minigame2/background.png new file mode 100644 index 0000000..73b12b9 Binary files /dev/null and b/assets/minigame2/background.png differ diff --git a/SOURCE/bg0.png b/assets/minigame2/bg0.png similarity index 100% rename from SOURCE/bg0.png rename to assets/minigame2/bg0.png diff --git a/assets/minigame2/black1.png b/assets/minigame2/black1.png new file mode 100644 index 0000000..fba4901 Binary files /dev/null and b/assets/minigame2/black1.png differ diff --git a/assets/minigame2/black2.png b/assets/minigame2/black2.png new file mode 100644 index 0000000..a054e81 Binary files /dev/null and b/assets/minigame2/black2.png differ diff --git a/assets/minigame2/black3.png b/assets/minigame2/black3.png new file mode 100644 index 0000000..00736b5 Binary files /dev/null and b/assets/minigame2/black3.png differ diff --git a/assets/minigame2/black4.png b/assets/minigame2/black4.png new file mode 100644 index 0000000..c5aacb4 Binary files /dev/null and b/assets/minigame2/black4.png differ diff --git a/assets/minigame2/black5.png b/assets/minigame2/black5.png new file mode 100644 index 0000000..5a9c7e0 Binary files /dev/null and b/assets/minigame2/black5.png differ diff --git a/assets/minigame2/player.png b/assets/minigame2/player.png new file mode 100644 index 0000000..10a6210 Binary files /dev/null and b/assets/minigame2/player.png differ diff --git a/assets/minigame2/sun1.png b/assets/minigame2/sun1.png new file mode 100644 index 0000000..7b71b3f Binary files /dev/null and b/assets/minigame2/sun1.png differ diff --git a/assets/minigame2/sun2.png b/assets/minigame2/sun2.png new file mode 100644 index 0000000..abb99a9 Binary files /dev/null and b/assets/minigame2/sun2.png differ diff --git a/assets/minigame2/sun3.png b/assets/minigame2/sun3.png new file mode 100644 index 0000000..d78b784 Binary files /dev/null and b/assets/minigame2/sun3.png differ diff --git a/assets/minigame2/sun4.png b/assets/minigame2/sun4.png new file mode 100644 index 0000000..dbe0605 Binary files /dev/null and b/assets/minigame2/sun4.png differ diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 3cae2d7..0000000 --- a/build.gradle +++ /dev/null @@ -1,19 +0,0 @@ -plugins { - id 'java' -} - -group 'org.example' -version '1.0-SNAPSHOT' - -repositories { - mavenCentral() -} - -dependencies { - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1' -} - -test { - useJUnitPlatform() -} \ No newline at end of file diff --git a/build/classes/java/main/client/mini3/BEffect.class b/build/classes/java/main/client/mini3/BEffect.class deleted file mode 100644 index b864ede..0000000 Binary files a/build/classes/java/main/client/mini3/BEffect.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/Back.class b/build/classes/java/main/client/mini3/Back.class deleted file mode 100644 index f7f0735..0000000 Binary files a/build/classes/java/main/client/mini3/Back.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/Bomb.class b/build/classes/java/main/client/mini3/Bomb.class deleted file mode 100644 index b63bfee..0000000 Binary files a/build/classes/java/main/client/mini3/Bomb.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/Effect.class b/build/classes/java/main/client/mini3/Effect.class deleted file mode 100644 index 33bbfbd..0000000 Binary files a/build/classes/java/main/client/mini3/Effect.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/Floating.class b/build/classes/java/main/client/mini3/Floating.class deleted file mode 100644 index 1dc0a20..0000000 Binary files a/build/classes/java/main/client/mini3/Floating.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/GameObject.class b/build/classes/java/main/client/mini3/GameObject.class deleted file mode 100644 index a398367..0000000 Binary files a/build/classes/java/main/client/mini3/GameObject.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/GameView$1.class b/build/classes/java/main/client/mini3/GameView$1.class deleted file mode 100644 index bcbf55d..0000000 Binary files a/build/classes/java/main/client/mini3/GameView$1.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/GameView.class b/build/classes/java/main/client/mini3/GameView.class deleted file mode 100644 index cf48306..0000000 Binary files a/build/classes/java/main/client/mini3/GameView.class and /dev/null differ diff --git "a/build/classes/java/main/client/mini3/HP\355\224\214\353\237\254\354\212\24410.class" "b/build/classes/java/main/client/mini3/HP\355\224\214\353\237\254\354\212\24410.class" deleted file mode 100644 index 084c734..0000000 Binary files "a/build/classes/java/main/client/mini3/HP\355\224\214\353\237\254\354\212\24410.class" and /dev/null differ diff --git a/build/classes/java/main/client/mini3/Item.class b/build/classes/java/main/client/mini3/Item.class deleted file mode 100644 index c4f588e..0000000 Binary files a/build/classes/java/main/client/mini3/Item.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/KeyControl.class b/build/classes/java/main/client/mini3/KeyControl.class deleted file mode 100644 index 864316e..0000000 Binary files a/build/classes/java/main/client/mini3/KeyControl.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/KeyImage.class b/build/classes/java/main/client/mini3/KeyImage.class deleted file mode 100644 index b333ce1..0000000 Binary files a/build/classes/java/main/client/mini3/KeyImage.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/Main.class b/build/classes/java/main/client/mini3/Main.class deleted file mode 100644 index d6046ff..0000000 Binary files a/build/classes/java/main/client/mini3/Main.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/MainFrame$MyPanel.class b/build/classes/java/main/client/mini3/MainFrame$MyPanel.class deleted file mode 100644 index c305768..0000000 Binary files a/build/classes/java/main/client/mini3/MainFrame$MyPanel.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/MainFrame.class b/build/classes/java/main/client/mini3/MainFrame.class deleted file mode 100644 index 58ed3f0..0000000 Binary files a/build/classes/java/main/client/mini3/MainFrame.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/Meteor.class b/build/classes/java/main/client/mini3/Meteor.class deleted file mode 100644 index a1904bb..0000000 Binary files a/build/classes/java/main/client/mini3/Meteor.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/Meteors.class b/build/classes/java/main/client/mini3/Meteors.class deleted file mode 100644 index 4d82e87..0000000 Binary files a/build/classes/java/main/client/mini3/Meteors.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/Missile.class b/build/classes/java/main/client/mini3/Missile.class deleted file mode 100644 index 4f6a646..0000000 Binary files a/build/classes/java/main/client/mini3/Missile.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/Player.class b/build/classes/java/main/client/mini3/Player.class deleted file mode 100644 index 8735f8a..0000000 Binary files a/build/classes/java/main/client/mini3/Player.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/S8K.class b/build/classes/java/main/client/mini3/S8K.class deleted file mode 100644 index 0cb4cf9..0000000 Binary files a/build/classes/java/main/client/mini3/S8K.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/Spaceship.class b/build/classes/java/main/client/mini3/Spaceship.class deleted file mode 100644 index 2cf05a0..0000000 Binary files a/build/classes/java/main/client/mini3/Spaceship.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/Unit.class b/build/classes/java/main/client/mini3/Unit.class deleted file mode 100644 index 45c537a..0000000 Binary files a/build/classes/java/main/client/mini3/Unit.class and /dev/null differ diff --git a/build/classes/java/main/client/mini3/User.class b/build/classes/java/main/client/mini3/User.class deleted file mode 100644 index 0c92497..0000000 Binary files a/build/classes/java/main/client/mini3/User.class and /dev/null differ diff --git a/build/tmp/compileJava/previous-compilation-data.bin b/build/tmp/compileJava/previous-compilation-data.bin deleted file mode 100644 index 550d4a8..0000000 Binary files a/build/tmp/compileJava/previous-compilation-data.bin and /dev/null differ diff --git a/gradlew b/gradlew deleted file mode 100644 index 744e882..0000000 --- a/gradlew +++ /dev/null @@ -1,185 +0,0 @@ -#!/usr/bin/env sh - -# -# Copyright 2015 the original author or authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MSYS* | MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=`expr $i + 1` - done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -exec "$JAVACMD" "$@" diff --git a/javaProject/.gitignore b/javaProject/.gitignore new file mode 100644 index 0000000..b63da45 --- /dev/null +++ b/javaProject/.gitignore @@ -0,0 +1,42 @@ +.gradle +build/ +!gradle/wrapper/gradle-wrapper.jar +!**/src/main/**/build/ +!**/src/test/**/build/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr +out/ +!**/src/main/**/out/ +!**/src/test/**/out/ + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache +bin/ +!**/src/main/**/bin/ +!**/src/test/**/bin/ + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/javaProject/build.gradle b/javaProject/build.gradle new file mode 100644 index 0000000..569d8bf --- /dev/null +++ b/javaProject/build.gradle @@ -0,0 +1,58 @@ +plugins { + id 'java' + id 'application' + id 'org.javamodularity.moduleplugin' version '1.8.12' + id 'org.openjfx.javafxplugin' version '0.0.13' + id 'org.beryx.jlink' version '2.25.0' +} + +group 'com.example' +version '1.0-SNAPSHOT' + +repositories { + mavenCentral() +} + +ext { + junitVersion = '5.9.1' +} + +sourceCompatibility = '17' +targetCompatibility = '17' + +tasks.withType(JavaCompile) { + options.encoding = 'UTF-8' +} + +application { + mainModule = 'com.example.javaproject' + mainClass = 'com.example.javaproject.HelloApplication' +} + +javafx { + version = '17.0.2' + modules = ['javafx.controls', 'javafx.fxml'] +} + +dependencies { + + testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}") + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}") + implementation group: 'mysql', name: 'mysql-connector-java', version: '8.0.26' +} + +test { + useJUnitPlatform() +} + +jlink { + imageZip = project.file("${buildDir}/distributions/app-${javafx.platform.classifier}.zip") + options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages'] + launcher { + name = 'app' + } +} + +jlinkZip { + group = 'distribution' +} \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/javaProject/gradle/wrapper/gradle-wrapper.jar similarity index 79% rename from gradle/wrapper/gradle-wrapper.jar rename to javaProject/gradle/wrapper/gradle-wrapper.jar index 7454180..249e583 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/javaProject/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/javaProject/gradle/wrapper/gradle-wrapper.properties similarity index 93% rename from gradle/wrapper/gradle-wrapper.properties rename to javaProject/gradle/wrapper/gradle-wrapper.properties index ffed3a2..070cb70 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/javaProject/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/javaProject/gradlew b/javaProject/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/javaProject/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/javaProject/gradlew.bat similarity index 96% rename from gradlew.bat rename to javaProject/gradlew.bat index 107acd3..ac1b06f 100644 --- a/gradlew.bat +++ b/javaProject/gradlew.bat @@ -1,89 +1,89 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/javaProject/settings.gradle b/javaProject/settings.gradle new file mode 100644 index 0000000..9ddf5f6 --- /dev/null +++ b/javaProject/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "javaProject" \ No newline at end of file diff --git a/javaProject/src/main/java/client/mini1/miniGame.java b/javaProject/src/main/java/client/mini1/miniGame.java new file mode 100644 index 0000000..f0e71b0 --- /dev/null +++ b/javaProject/src/main/java/client/mini1/miniGame.java @@ -0,0 +1,286 @@ +package client.mini1; +import javax.imageio.ImageIO; +import javax.swing.*; +import javax.swing.Timer; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; +import java.util.*; + +public class miniGame extends JFrame { + + + //전역변수 필드 + + public long score = 100; + imgLabel selected; + boolean status = false; + boolean selecting = false; + JLabel timerLabel; + long count = 0; + + private ArrayList labels = new ArrayList<>(); + + + // 태양, 달 이미지 설정 + String sun1 = "assets/minigame1/sun1.png"; + String sun2 = "assets/minigame1/sun2.png"; + String sun3 = "assets/minigame1/sun3.png"; + String black1 = "assets/minigame1/black1.png"; + String black2 = "assets/minigame1/black2.png"; + String player = "assets/minigame1/player.png"; + + + //이미지 설정 + + imgLabel background = new imgLabel("assets/minigame1/background.png","background"); + imgLabel l1 = new imgLabel(sun1,"sun"); + imgLabel l2 = new imgLabel(black1,"black"); + imgLabel l3 = new imgLabel(sun3,"sun"); + imgLabel l4 = new imgLabel(sun2,"sun"); + imgLabel l5 = new imgLabel(black2,"black"); + imgLabel l6 = new imgLabel(black1,"black"); + imgLabel l7 = new imgLabel(sun1,"sun"); + + JLayeredPane mainLayer = new JLayeredPane(); + + + + class imgLabel extends JLabel { + BufferedImage img; + + String filename; + String flag; + + public imgLabel (String filename,String flag) { + try{ + img = ImageIO.read(new File(filename)); + + } catch (IOException e){ + e.printStackTrace(); + } + this.filename = filename; + this.flag = flag; + + } + + @Override + public void paintComponent(Graphics g) { + super.paintComponent(g); + g.drawImage(img,0,0,getWidth(),getHeight(),null); + + } + + + // 이미지 랜덤설정 + public void setRandomImg() { + try { + String[] imageOptions = {"sun1.png", "sun2.png", "sun3.png", "black1.png", "black2.png","sun3.png","black3.png","black4.png","black.png","sun4.png"}; + Random random = new Random(System.currentTimeMillis()); + int randomIndex = random.nextInt(imageOptions.length); + String imagePath = "assets/minigame1/" + imageOptions[randomIndex]; + img = ImageIO.read(new File(imagePath)); + if(randomIndex>3) + this.flag = "black"; + else + this.flag = "sun"; + repaint(); + } catch (IOException e) { + e.printStackTrace(); + } + mainLayer.repaint(); + } + + public String getImgLabel() { + return this.filename; + } + } + + // 맨앞의 이미지 제거, 뒤에 있는 이미지를 앞으로 이동 + public void setAllImages(imgLabel selected){ + labels.remove(selected); + labels.add(selected); + for(int i = 0; i 0) score--; + } else if (selected.flag.equals("sun") && e.getKeyCode() == KeyEvent.VK_RIGHT) { + setAllImages(selected); + if (score > 0) score--; + } + else if(selected.flag.equals("black") && e.getKeyCode() == KeyEvent.VK_RIGHT){ + score++; + setAllImages(selected); + } + else if(selected.flag.equals("sun") && e.getKeyCode() == KeyEvent.VK_LEFT){ + score++; + setAllImages(selected); + } + if(score>100) + scoreSec.setText("Score: " + String.valueOf(score)); + else + scoreSec.setText("Score: " + String.valueOf(score)); + } + } + } + }); + + + } + + public static void main(String[] args) { + new miniGame(); + } + + + public void init() { + // 점수 0으로 + // 타이머 0으로 + score = 0; + status = true; + count = 100; + + } + + + + + + + + +} diff --git a/javaProject/src/main/java/client/social/login.java b/javaProject/src/main/java/client/social/login.java new file mode 100644 index 0000000..1390867 --- /dev/null +++ b/javaProject/src/main/java/client/social/login.java @@ -0,0 +1,170 @@ +package client.social; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.*; + +public class login extends JFrame { + private JTextField usernameTextField; + private JPasswordField passwordField; + + public login() { + // 프레임 설정 + setTitle("로그인 화면"); + setSize(800, 800); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + + // 배경 이미지 설정 (가정) + JLabel backgroundLabel = new JLabel(new ImageIcon("assets/minigame2/bg0.png")); + backgroundLabel.setLayout(null); + setContentPane(backgroundLabel); + + // 패널과 레이아웃 설정 + JPanel panel = new JPanel(); + panel.setLayout(new BorderLayout()); + + // 로그인 폼 생성 + createLoginForm(panel); + + // 패널을 배경 이미지의 중앙에 추가 + backgroundLabel.add(panel); + Dimension size = panel.getPreferredSize(); + panel.setBounds((getWidth() - size.width) / 2, (getHeight() - size.height) / 2, size.width, size.height); + + // 프레임 표시 + setVisible(true); + } + + private void createLoginForm(JPanel panel) { + // 레이아웃 설정 + JPanel formPanel = new JPanel(new GridLayout(6, 1)); + formPanel.setPreferredSize(new Dimension(300, 200)); + formPanel.setBackground(Color.BLACK); + formPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + panel.add(formPanel); + + // 로그인 타이틀 + JPanel loginTitlePanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); + loginTitlePanel.setBackground(Color.BLACK); + JLabel loginTitle = new JLabel("로그인"); + loginTitle.setForeground(Color.WHITE); + loginTitle.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 20)); + loginTitlePanel.add(loginTitle); + formPanel.add(loginTitlePanel); + + // 닉네임 입력 필드 + JPanel namePanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); + namePanel.setBackground(Color.BLACK); + namePanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); + JLabel nameLabel = new JLabel("아이디"); + nameLabel.setForeground(Color.WHITE); + nameLabel.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 15)); + usernameTextField = new JTextField(10); + namePanel.add(nameLabel); + namePanel.add(usernameTextField); + formPanel.add(namePanel); + + // 비밀번호 입력 + JPanel loginpsdPanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); + loginpsdPanel.setBackground(Color.BLACK); + JLabel passwordLabel = new JLabel("비밀번호"); + passwordLabel.setForeground(Color.WHITE); + passwordLabel.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 15)); + passwordField = new JPasswordField(10); + loginpsdPanel.add(passwordLabel); + loginpsdPanel.add(passwordField); + formPanel.add(loginpsdPanel); + + // 로그인 버튼 + JPanel btnPanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); + btnPanel.setBackground(Color.BLACK); + btnPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); + JButton loginButton = new JButton("로그인"); + loginButton.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 15)); + btnPanel.add(loginButton); + formPanel.add(btnPanel); + + //회원가입으로 이동 버튼 + JPanel moveToSignupPanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); + moveToSignupPanel.setBackground(Color.BLACK); + moveToSignupPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); + JButton moveToSignupButton = new JButton("회원가입하기"); + moveToSignupButton.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 15)); + moveToSignupPanel.add(moveToSignupButton); + formPanel.add(moveToSignupPanel); + + moveToSignupButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + dispose(); // Close the current login window + new signup(); // Open the signup window + } + }); + formPanel.add(moveToSignupButton); + + // 로그인 버튼의 액션 리스너 + loginButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String username = usernameTextField.getText(); + String password = new String(passwordField.getPassword()); + + // 로그인 처리 + if (isValidLogin(username, password)) { + JOptionPane.showMessageDialog(null, "로그인 성공!"); + // 여기에 로그인 후의 작업 추가 (예: 메인 화면으로 이동) + } else { + JOptionPane.showMessageDialog(null, "로그인 실패. 아이디 또는 비밀번호를 확인하세요."); + } + } + }); + } + + private boolean isValidLogin(String username, String password) { + // 데이터베이스 연결 정보 + String url = "jdbc:mysql://34.64.188.49:3306/solarSystem?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC"; + String user = "java"; + String dbPassword = "solarsystem"; + + try { + // JDBC 드라이버 로드 + Class.forName("com.mysql.cj.jdbc.Driver"); + + // 데이터베이스 연결 + Connection connection = DriverManager.getConnection(url, user, dbPassword); + + // SQL 쿼리 작성 + String sql = "SELECT * FROM user WHERE userName = ? AND userPasswd = ?"; + PreparedStatement preparedStatement = connection.prepareStatement(sql); + preparedStatement.setString(1, username); + preparedStatement.setString(2, password); + + // 쿼리 실행 + ResultSet resultSet = preparedStatement.executeQuery(); + + // 결과 확인 + boolean isValid = resultSet.next(); + + // 연결 종료 + preparedStatement.close(); + connection.close(); + + return isValid; + } catch (ClassNotFoundException | SQLException e) { + e.printStackTrace(); + return false; + } + } + + public static void main(String[] args) { + // 이 부분에서 Swing 컴포넌트를 생성하는 코드를 작성 + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + new login(); + } + }); + } +} diff --git a/javaProject/src/main/java/client/social/signup.java b/javaProject/src/main/java/client/social/signup.java new file mode 100644 index 0000000..7184ec3 --- /dev/null +++ b/javaProject/src/main/java/client/social/signup.java @@ -0,0 +1,217 @@ +package client.social; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.*; + +public class signup extends JFrame { + private JTextField usernameTextField; + private JPasswordField passwordField; + + public signup() { + // 프레임 설정 + setTitle("회원가입 화면"); + setSize(800, 800); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + + // 배경 이미지 설정 (가정) + JLabel backgroundLabel = new JLabel(new ImageIcon("assets/minigame2/bg0.png")); + backgroundLabel.setLayout(null); + setContentPane(backgroundLabel); + + // 패널과 레이아웃 설정 + JPanel panel = new JPanel(); + panel.setLayout(new BorderLayout()); + + // 회원가입 폼 생성 + createSignUpForm(panel); + + // 패널을 배경 이미지의 중앙에 추가 + backgroundLabel.add(panel); + Dimension size = panel.getPreferredSize(); + panel.setBounds((getWidth() - size.width) / 2, (getHeight() - size.height) / 2, size.width, size.height); + + // 프레임 표시 + setVisible(true); + } + + private void createSignUpForm(JPanel panel) { + // 레이아웃 설정 + JPanel formPanel = new JPanel(new GridLayout(4,1)); // 3행 2열의 그리드 레이아웃으로 변경 + formPanel.setPreferredSize(new Dimension(300, 300)); + formPanel.setBackground(Color.BLACK); + formPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + panel.add(formPanel); + + // 회원가입 타이틀 + JPanel signUpTitlePanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); + signUpTitlePanel.setBackground(Color.BLACK); + JLabel signUpTitle = new JLabel("회원가입"); + signUpTitle.setForeground(Color.WHITE); + signUpTitle.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 20)); + signUpTitlePanel.add(signUpTitle); + formPanel.add(signUpTitlePanel); + + // 회원 닉네임 입력 필드 및 중복확인 버튼 + JPanel usernamePanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); + usernamePanel.setBackground(Color.BLACK);; + usernamePanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); + JLabel usernameLabel = new JLabel("회원 닉네임"); + usernameLabel.setForeground(Color.WHITE); // 텍스트 색상을 흰색으로 변경 + usernameLabel.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 15)); // 폰트 설정 + usernameTextField = new JTextField(10); + JButton checkDuplicateButton = new JButton("중복확인"); + checkDuplicateButton.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 12)); // 폰트 크기를 12로 변경 + usernamePanel.add(usernameLabel); + usernamePanel.add(usernameTextField); + usernamePanel.add(checkDuplicateButton); + formPanel.add(usernamePanel); + + // 비밀번호 입력 필드 + JPanel passwordPanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); + passwordPanel.setBackground(Color.BLACK); + passwordPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); + JLabel passwordLabel = new JLabel("비밀번호:"); + passwordLabel.setForeground(Color.WHITE); // 텍스트 색상을 흰색으로 변경 + passwordLabel.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 15)); // 폰트 설정 + passwordField = new JPasswordField(10); + passwordPanel.add(passwordLabel); + passwordPanel.add(passwordField); + formPanel.add(passwordPanel); + + + // 회원가입 버튼 + JPanel btnPanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); + btnPanel.setBackground(Color.BLACK); + btnPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); + JButton signUpButton = new JButton("회원가입하기"); + signUpButton.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 15)); // 폰트 설정 + btnPanel.add(signUpButton); + formPanel.add(btnPanel); + + // 중복확인 버튼의 액션 리스너 + checkDuplicateButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String username = usernameTextField.getText(); + if (isUsernameAvailable(username)) { + JOptionPane.showMessageDialog(null, "사용 가능한 닉네임입니다."); + } else { + JOptionPane.showMessageDialog(null, "이미 사용 중인 닉네임입니다."); + } + } + }); + + // 회원가입 버튼의 액션 리스너 + signUpButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String username = usernameTextField.getText(); + String password = new String(passwordField.getPassword()); + + if (isUsernameAvailable(username)) { + // 회원 정보를 DB에 저장 + if (saveUserToDB(username, password)) { + JOptionPane.showMessageDialog(null, "회원가입이 완료되었습니다."); + // 여기에 원하는 작업 추가 (예: 로그인 화면으로 이동) + } else { + JOptionPane.showMessageDialog(null, "회원가입에 실패했습니다."); + } + } else { + JOptionPane.showMessageDialog(null, "닉네임 중복 확인이 필요합니다."); + } + } + }); + } + + private boolean isUsernameAvailable(String username) { + // 데이터베이스 연결 정보 + String url = "jdbc:mysql://34.64.188.49:3306/solarSystem?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC"; + String user = "java"; + String dbPassword = "solarsystem"; + + try { + // JDBC 드라이버 로드 + Class.forName("com.mysql.cj.jdbc.Driver"); + + // 데이터베이스 연결 + Connection connection = DriverManager.getConnection(url, user, dbPassword); + + // SQL 쿼리 작성 + String sql = "SELECT COUNT(*) FROM user WHERE userName = ?"; + PreparedStatement preparedStatement = connection.prepareStatement(sql); + preparedStatement.setString(1, username); + + // 쿼리 실행 + ResultSet resultSet = preparedStatement.executeQuery(); + + // 결과 확인 + if (resultSet.next()) { + int count = resultSet.getInt(1); + + // 연결 종료 + preparedStatement.close(); + connection.close(); + + // count가 0이면 사용 가능한 username + return count == 0; + } + } catch (ClassNotFoundException e) { + JOptionPane.showMessageDialog(null, "JDBC 드라이버를 찾지 못했습니다."); + System.out.println(e.getMessage()); + } catch (SQLException e) { + JOptionPane.showMessageDialog(null, "데이터베이스 연결에 실패했습니다. 에러 메시지: " + e.getMessage()); + System.out.println(e.getMessage()); + } + + // 예외가 발생하거나 검색 결과가 없는 경우 기본적으로 사용 불가능한 username으로 간주 + return false; + } + + + private boolean saveUserToDB(String username, String password) { + // 데이터베이스 연결 정보 + String url = "jdbc:mysql://34.64.188.49:3306/solarSystem?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC"; + String user = "java"; + String dbPassword = "solarsystem"; + + try { + // JDBC 드라이버 로드 + Class.forName("com.mysql.cj.jdbc.Driver"); + + // 데이터베이스 연결 + Connection connection = DriverManager.getConnection(url, user, dbPassword); + + // SQL 쿼리 작성 + String sql = "INSERT INTO user (userName, userPasswd) VALUES (?, ?)"; + PreparedStatement preparedStatement = connection.prepareStatement(sql); + preparedStatement.setString(1, username); + preparedStatement.setString(2, password); + + // 쿼리 실행 + int result = preparedStatement.executeUpdate(); + + // 연결 종료 + preparedStatement.close(); + connection.close(); + + // 쿼리 실행 결과 반환 + return result > 0; + } catch (ClassNotFoundException | SQLException e) { + e.printStackTrace(); + return false; + } + } + + public static void main(String[] args) { + // 이 부분에서 Swing 컴포넌트를 생성하는 코드를 작성 + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + new signup(); + } + }); + } +} \ No newline at end of file diff --git a/javaProject/src/main/java/com/example/javaproject/HelloApplication.java b/javaProject/src/main/java/com/example/javaproject/HelloApplication.java new file mode 100644 index 0000000..9e77128 --- /dev/null +++ b/javaProject/src/main/java/com/example/javaproject/HelloApplication.java @@ -0,0 +1,23 @@ +package com.example.javaproject; + +import javafx.application.Application; +import javafx.fxml.FXMLLoader; +import javafx.scene.Scene; +import javafx.stage.Stage; + +import java.io.IOException; + +public class HelloApplication extends Application { + @Override + public void start(Stage stage) throws IOException { + FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("hello-view.fxml")); + Scene scene = new Scene(fxmlLoader.load(), 320, 240); + stage.setTitle("Hello!"); + stage.setScene(scene); + stage.show(); + } + + public static void main(String[] args) { + launch(); + } +} \ No newline at end of file diff --git a/javaProject/src/main/java/com/example/javaproject/HelloController.java b/javaProject/src/main/java/com/example/javaproject/HelloController.java new file mode 100644 index 0000000..c5d6fa7 --- /dev/null +++ b/javaProject/src/main/java/com/example/javaproject/HelloController.java @@ -0,0 +1,14 @@ +package com.example.javaproject; + +import javafx.fxml.FXML; +import javafx.scene.control.Label; + +public class HelloController { + @FXML + private Label welcomeText; + + @FXML + protected void onHelloButtonClick() { + welcomeText.setText("Welcome to JavaFX Application!"); + } +} \ No newline at end of file diff --git a/javaProject/src/main/java/module-info.java b/javaProject/src/main/java/module-info.java new file mode 100644 index 0000000..31180b5 --- /dev/null +++ b/javaProject/src/main/java/module-info.java @@ -0,0 +1,10 @@ +module com.example.javaproject { + requires javafx.controls; + requires javafx.fxml; + requires java.sql; + requires java.desktop; + + + opens com.example.javaproject to javafx.fxml; + exports com.example.javaproject; +} \ No newline at end of file diff --git a/javaProject/src/main/java/server/server.md b/javaProject/src/main/java/server/server.md new file mode 100644 index 0000000..e69de29 diff --git a/javaProject/src/main/resources/com/example/javaproject/hello-view.fxml b/javaProject/src/main/resources/com/example/javaproject/hello-view.fxml new file mode 100644 index 0000000..5128c18 --- /dev/null +++ b/javaProject/src/main/resources/com/example/javaproject/hello-view.fxml @@ -0,0 +1,16 @@ + + + + + + + + + + + + +