-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
*Implementato un nuovo pattern di gioco fino al punteggio 800 *Nuovo boss (nuovo file domande più difficile) *Nuova fase intermedia tra primo e secondo boss con nuovo file domande *Implementato path e ip in locale Co-Authored-By: camillo-yyy <[email protected]>
- Loading branch information
1 parent
61540da
commit aad7c9a
Showing
114 changed files
with
6,477 additions
and
6,103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# QuizGame | ||
|
||
## Modalità di gioco | ||
L’utente dopo aver scelto il suo nickname in-game, viene posto di fronte a una | ||
serie di domande alla quale dovrà rispondere correttamente inserendo la | ||
risposta nell’apposito contenitore testuale. L’utente inizia la partita con un | ||
punteggio standard di 100 punti. Ogni domanda ha un suo valore in termini di | ||
punteggio ed un numero di tentativi massimi. Se l’utente indovinerà la | ||
domanda il punteggio salirà del valore di essa, se invece al termine dei tentativi | ||
non ci sarà riuscito il suo punteggio decrementerà del medesimo valore. Il | ||
termine della partita viene sancito nel momento in cui il giocatore esaurisce i | ||
suoi punti (0 punti) e il punteggio massimo raggiunto verrà registrato, insieme | ||
al suo nickname, in una classifica globale con tutti gli altri giocatori. | ||
|
||
## Architettura dell’applicazione | ||
Al fine di realizzare un’applicazione che fosse indipendente dalla piattaforma su | ||
cui viene avviata e che potesse mostrare le caratteristiche dei socket, threading | ||
e oggetti è stata utilizzata un’architettura di comunicazione client/server. | ||
Il server implementa la tecnica del multi-threading per consentire la | ||
connessione di più client connessi contemporaneamente. La connessione e il | ||
trasferimento dei dati per ogni thread è implementata attraverso l’IPC dei | ||
Socket i quali, in questo caso, lavorano sul protocollo TCP/IP. | ||
Le informazioni che il server e i client si scambiano vengono racchiuse | ||
attraverso una classe condivisa Messaggio la quale contiene tutti i dati relativi | ||
al funzionamento del gioco (vedere progettazione ad oggetti). | ||
Il server mette a disposizione questo servizio sulla porta 6076, la quale è stata | ||
definita in maniera standard per semplificare la connessione. | ||
|
||
## Implementazioni di sicurezza lato server | ||
Per evitare un affollamento di troppe connessioni contemporanee è stato scelto | ||
preventivamente di limitare il numero di thread creabili a 10. E’ stata inoltre | ||
implementata una sleep di 5 secondi dopo l’allocazione di un thread per | ||
evitare flooding di richieste. | ||
|
||
## Interfacciamento con Web Server | ||
Al termine della partita ogni thread accede in scrittura ad un file XML in cui | ||
scrive i migliori punteggi degli utenti. Tale file è letto dall’interprete php nel | ||
momento in cui viene richiesta la pagina web relativa al gioco, la quale è | ||
disponibile in rete attraverso un Web Server Apache in esecuzione sulla stessa | ||
macchina sulla porta 8289. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-10.2 KB
Quizv0.3c/QuizServer/QuizServer/build/classes/quiz/ClientWork.class
Binary file not shown.
7 changes: 0 additions & 7 deletions
7
Quizv0.3c/QuizServer/QuizServer/build/classes/quiz/leaderboard.xml
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
6 changes: 0 additions & 6 deletions
6
Quizv0.3c/QuizShare/QuizShare/nbproject/private/private.properties
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# QuizGame | ||
|
||
## Modalità di gioco | ||
L’utente dopo aver scelto il suo nickname in-game, viene posto di fronte a una | ||
serie di domande alla quale dovrà rispondere correttamente inserendo la | ||
risposta nell’apposito contenitore testuale. L’utente inizia la partita con un | ||
punteggio standard di 100 punti. Ogni domanda ha un suo valore in termini di | ||
punteggio ed un numero di tentativi massimi. Se l’utente indovinerà la | ||
domanda il punteggio salirà del valore di essa, se invece al termine dei tentativi | ||
non ci sarà riuscito il suo punteggio decrementerà del medesimo valore. Il | ||
termine della partita viene sancito nel momento in cui il giocatore esaurisce i | ||
suoi punti (0 punti) e il punteggio massimo raggiunto verrà registrato, insieme | ||
al suo nickname, in una classifica globale con tutti gli altri giocatori. | ||
|
||
## Architettura dell’applicazione | ||
Al fine di realizzare un’applicazione che fosse indipendente dalla piattaforma su | ||
cui viene avviata e che potesse mostrare le caratteristiche dei socket, threading | ||
e oggetti è stata utilizzata un’architettura di comunicazione client/server. | ||
Il server implementa la tecnica del multi-threading per consentire la | ||
connessione di più client connessi contemporaneamente. La connessione e il | ||
trasferimento dei dati per ogni thread è implementata attraverso l’IPC dei | ||
Socket i quali, in questo caso, lavorano sul protocollo TCP/IP. | ||
Le informazioni che il server e i client si scambiano vengono racchiuse | ||
attraverso una classe condivisa Messaggio la quale contiene tutti i dati relativi | ||
al funzionamento del gioco (vedere progettazione ad oggetti). | ||
Il server mette a disposizione questo servizio sulla porta 6076, la quale è stata | ||
definita in maniera standard per semplificare la connessione. | ||
|
||
## Implementazioni di sicurezza lato server | ||
Per evitare un affollamento di troppe connessioni contemporanee è stato scelto | ||
preventivamente di limitare il numero di thread creabili a 10. E’ stata inoltre | ||
implementata una sleep di 5 secondi dopo l’allocazione di un thread per | ||
evitare flooding di richieste. | ||
|
||
## Interfacciamento con Web Server | ||
Al termine della partita ogni thread accede in scrittura ad un file XML in cui | ||
scrive i migliori punteggi degli utenti. Tale file è letto dall’interprete php nel | ||
momento in cui viene richiesta la pagina web relativa al gioco, la quale è | ||
disponibile in rete attraverso un Web Server Apache in esecuzione sulla stessa | ||
macchina sulla porta 8289. |
146 changes: 73 additions & 73 deletions
146
Quizv0.3c/QuizClient/Quiz/build.xml → Quizv0.3d/QuizClient/Quiz/build.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,73 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- You may freely edit this file. See commented blocks below for --> | ||
<!-- some examples of how to customize the build. --> | ||
<!-- (If you delete it and reopen the project it will be recreated.) --> | ||
<!-- By default, only the Clean and Build commands use this build script. --> | ||
<!-- Commands such as Run, Debug, and Test only use this build script if --> | ||
<!-- the Compile on Save feature is turned off for the project. --> | ||
<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> | ||
<!-- in the project's Project Properties dialog box.--> | ||
<project name="QuizClient" default="default" basedir="."> | ||
<description>Builds, tests, and runs the project QuizClient.</description> | ||
<import file="nbproject/build-impl.xml"/> | ||
<!-- | ||
There exist several targets which are by default empty and which can be | ||
used for execution of your tasks. These targets are usually executed | ||
before and after some main targets. They are: | ||
-pre-init: called before initialization of project properties | ||
-post-init: called after initialization of project properties | ||
-pre-compile: called before javac compilation | ||
-post-compile: called after javac compilation | ||
-pre-compile-single: called before javac compilation of single file | ||
-post-compile-single: called after javac compilation of single file | ||
-pre-compile-test: called before javac compilation of JUnit tests | ||
-post-compile-test: called after javac compilation of JUnit tests | ||
-pre-compile-test-single: called before javac compilation of single JUnit test | ||
-post-compile-test-single: called after javac compilation of single JUunit test | ||
-pre-jar: called before JAR building | ||
-post-jar: called after JAR building | ||
-post-clean: called after cleaning build products | ||
(Targets beginning with '-' are not intended to be called on their own.) | ||
Example of inserting an obfuscator after compilation could look like this: | ||
<target name="-post-compile"> | ||
<obfuscate> | ||
<fileset dir="${build.classes.dir}"/> | ||
</obfuscate> | ||
</target> | ||
For list of available properties check the imported | ||
nbproject/build-impl.xml file. | ||
Another way to customize the build is by overriding existing main targets. | ||
The targets of interest are: | ||
-init-macrodef-javac: defines macro for javac compilation | ||
-init-macrodef-junit: defines macro for junit execution | ||
-init-macrodef-debug: defines macro for class debugging | ||
-init-macrodef-java: defines macro for class execution | ||
-do-jar: JAR building | ||
run: execution of project | ||
-javadoc-build: Javadoc generation | ||
test-report: JUnit report generation | ||
An example of overriding the target for project execution could look like this: | ||
<target name="run" depends="QuizClient-impl.jar"> | ||
<exec dir="bin" executable="launcher.exe"> | ||
<arg file="${dist.jar}"/> | ||
</exec> | ||
</target> | ||
Notice that the overridden target depends on the jar target and not only on | ||
the compile target as the regular run target does. Again, for a list of available | ||
properties which you can use, check the target you are overriding in the | ||
nbproject/build-impl.xml file. | ||
--> | ||
</project> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- You may freely edit this file. See commented blocks below for --> | ||
<!-- some examples of how to customize the build. --> | ||
<!-- (If you delete it and reopen the project it will be recreated.) --> | ||
<!-- By default, only the Clean and Build commands use this build script. --> | ||
<!-- Commands such as Run, Debug, and Test only use this build script if --> | ||
<!-- the Compile on Save feature is turned off for the project. --> | ||
<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> | ||
<!-- in the project's Project Properties dialog box.--> | ||
<project name="QuizClient" default="default" basedir="."> | ||
<description>Builds, tests, and runs the project QuizClient.</description> | ||
<import file="nbproject/build-impl.xml"/> | ||
<!-- | ||
There exist several targets which are by default empty and which can be | ||
used for execution of your tasks. These targets are usually executed | ||
before and after some main targets. They are: | ||
-pre-init: called before initialization of project properties | ||
-post-init: called after initialization of project properties | ||
-pre-compile: called before javac compilation | ||
-post-compile: called after javac compilation | ||
-pre-compile-single: called before javac compilation of single file | ||
-post-compile-single: called after javac compilation of single file | ||
-pre-compile-test: called before javac compilation of JUnit tests | ||
-post-compile-test: called after javac compilation of JUnit tests | ||
-pre-compile-test-single: called before javac compilation of single JUnit test | ||
-post-compile-test-single: called after javac compilation of single JUunit test | ||
-pre-jar: called before JAR building | ||
-post-jar: called after JAR building | ||
-post-clean: called after cleaning build products | ||
(Targets beginning with '-' are not intended to be called on their own.) | ||
Example of inserting an obfuscator after compilation could look like this: | ||
<target name="-post-compile"> | ||
<obfuscate> | ||
<fileset dir="${build.classes.dir}"/> | ||
</obfuscate> | ||
</target> | ||
For list of available properties check the imported | ||
nbproject/build-impl.xml file. | ||
Another way to customize the build is by overriding existing main targets. | ||
The targets of interest are: | ||
-init-macrodef-javac: defines macro for javac compilation | ||
-init-macrodef-junit: defines macro for junit execution | ||
-init-macrodef-debug: defines macro for class debugging | ||
-init-macrodef-java: defines macro for class execution | ||
-do-jar: JAR building | ||
run: execution of project | ||
-javadoc-build: Javadoc generation | ||
test-report: JUnit report generation | ||
An example of overriding the target for project execution could look like this: | ||
<target name="run" depends="QuizClient-impl.jar"> | ||
<exec dir="bin" executable="launcher.exe"> | ||
<arg file="${dist.jar}"/> | ||
</exec> | ||
</target> | ||
Notice that the overridden target depends on the jar target and not only on | ||
the compile target as the regular run target does. Again, for a list of available | ||
properties which you can use, check the target you are overriding in the | ||
nbproject/build-impl.xml file. | ||
--> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#Thu, 20 Jan 2022 21:17:07 +0100 | ||
|
||
|
||
C\:\\Users\\Yacine\\Desktop\\Quizv0.3d\\Quizv0.3d\\QuizClient\\Quiz= | ||
|
||
C\:\\Users\\Yacine\\Desktop\\Quizv0.3d\\Quizv0.3d\\QuizShare\\QuizShare= |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file renamed
BIN
+19.8 KB
...Client/Quiz/build/classes/quiz/Quiz.class → ...Client/Quiz/build/classes/quiz/Quiz.class
Binary file not shown.
Binary file renamed
BIN
+359 KB
...v0.3c/QuizClient/Quiz/dist/QuizClient.jar → ...v0.3d/QuizClient/Quiz/dist/QuizClient.jar
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Binary file renamed
BIN
+1.64 KB
...c/QuizServer/QuizServer/dist/lib/Quiz.jar → Quizv0.3d/QuizClient/Quiz/dist/lib/Quiz.jar
Binary file not shown.
Oops, something went wrong.