Premier Commit
@@ -0,0 +1,15 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/caches
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
/.idea/workspace.xml
|
||||
/.idea/navEditor.xml
|
||||
/.idea/assetWizardSettings.xml
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
||||
@@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="17" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<value>
|
||||
<entry key="MainActivity">
|
||||
<State />
|
||||
</entry>
|
||||
<entry key="app">
|
||||
<State />
|
||||
</entry>
|
||||
</value>
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveExternalAnnotations" value="false" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectMigrations">
|
||||
<option name="MigrateToGradleLocalJavaHome">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,9 @@
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1 @@
|
||||
/build
|
||||
@@ -0,0 +1,43 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'com.example.boidelov3'
|
||||
compileSdk 33
|
||||
packagingOptions { resources.excludes.add("META-INF/*") } // This line is added to avoid the error: Duplicate files copied in APK META-INF/LICENSE.txt
|
||||
defaultConfig {
|
||||
applicationId "com.example.boidelov3"
|
||||
minSdk 24
|
||||
targetSdk 33
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'com.google.android.material:material:1.9.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
|
||||
implementation 'com.impossibl.pgjdbc-ng:pgjdbc-ng:0.8.3'
|
||||
implementation 'com.google.code.gson:gson:2.8.8'
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
@@ -0,0 +1,41 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.BoideloV3"
|
||||
tools:targetApi="31">
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name="com.example.boidelov3.Jeux"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:exported="true">
|
||||
<!-- Ajoutez ici les filtres d'intention appropriés si nécessaire -->
|
||||
</activity>
|
||||
<activity android:name="com.example.boidelov3.JeuxParametres"
|
||||
android:exported="true">
|
||||
|
||||
</activity>
|
||||
<activity android:name="com.example.boidelov3.ChatGPTTask"
|
||||
android:exported="true">
|
||||
</activity>
|
||||
|
||||
<!-- Ajoutez ici les filtres d'intention appropriés si nécessaire -->
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,813 @@
|
||||
|
||||
{
|
||||
"version": "2",
|
||||
"questions": [
|
||||
{
|
||||
"id": 1,
|
||||
"question": "Celles/Ceux qui ont habité dans plus de 3 villes diferentes",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"question": "Ceux qui ont dansé aujourd'hui",
|
||||
"gorger": 1,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"question": "si tu n'as pas ton veritable nom sur insta",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"question": "si tu a des photos sur insta",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"question": "Les joueurs de Counter Strike ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"question": "La dernière personne à avoir vomi en soirée ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"question": "Toutes celles (ou ceux) qui ont du verni à ongles",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"question": "Tous les joueurs célibataires",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"question": "Tous ceux qui ont des lunettes",
|
||||
"gorger": 2,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"question": "Tous ceux qui ont déjà triché à un examen",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"question": "Le/La plus radin(e)",
|
||||
"gorger": 4,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"question": "<J1> a toi de juger : entre <J1> et <J2> qui stresse le plus pour un rien selon toi? Le perdant ",
|
||||
"gorger": 5,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
}, {
|
||||
"id": 12,
|
||||
"question": "Le mec qui a le plus gros ventre à bière ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"question": "Tous ceux qui se sont déjà fait exclure de cours",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"question": "<J1>, donne le nombre d'habitant du/de la <variante> ( à 1 000 000 près) Si tu as faux tu bois, sinon tu ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": false,
|
||||
"variante": ["Tadjikistant", "Monaco", "Belgique", "Suisse", "Allemagne", "Chine", "Inde"]
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"question": "Tous ceux qui ont des frères et soeurs",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"question": "<J1> a qui appartient le slogan suivant? <variante>",
|
||||
"variante": ["Des pâtes oui mais des (panzani)"," Le plaisir pour les petites faims. (Kinder Bueno)","Réveillez le lion qui est en vous. (Cereale lion)","Parce que le monde bouge (CIC)","Ça coule de source ! (Cristaline)", "Pensez différemment (apple)" ],
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"question": "Celles et ceux qui ont eu un Windows phone",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"question": "<J1>, Boire un café fait baisser le taux d'alcool? Si tu as faux ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"question": "Celles/Ceux qui se sont déjà battus",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"question": "Celui/Celle qui pèse le plus lourd",
|
||||
"variante": ["lourd","leger"],
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": false
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"question": "Pour se décoincer, le/la plus <variante>",
|
||||
"variante": ["timide", "enervé ", "angoissé","aigri"],
|
||||
"gorger": 2,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"question": "Le/La plus <variante>",
|
||||
"gorger": 3,
|
||||
"variante": ["jeune","vieille"],
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 23,
|
||||
"question": "Celles/Ceux qui ont fait des études <variante>",
|
||||
"gorger": 3,
|
||||
"variante": ["L","Scientifique", "Bac Professionel", "STMG"],
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"question": "Celles et ceux qui ont deja joué <variante> de maniere recurrente ",
|
||||
"gorger": 3,
|
||||
"variante": ["du piano","de la guitare", "du saxophone", "de la batterie"],
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 26,
|
||||
"question": "Les gens qui se sont masturbés aujourd'hui",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true,
|
||||
"caliente": true
|
||||
},
|
||||
{
|
||||
"id": 27,
|
||||
"question": "Celui ou celle a la meilleure place",
|
||||
"gorger": 2,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"question": "Celles et ceux qui n'ont jamais trompé leur partenaire",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 29,
|
||||
"question": "Celui/Celle avec les vêtements les plus beaux ",
|
||||
"gorger": 1,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 30,
|
||||
"question": "Celui/Celle qui a les cheveux les plus <variante> ",
|
||||
"gorger": 2,
|
||||
"variante": ["longs","courts"],
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 31,
|
||||
"question": "Les végans ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 32,
|
||||
"question": "La personne la plus maquillé ",
|
||||
"gorger": 2,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
}, {
|
||||
"id": 33,
|
||||
"question": "Celles/Ceux qui ont déjà appelé leur partenaire par le prénom de leurs ex",
|
||||
"gorger": 4,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 34,
|
||||
"question": "Celles et ceux qui boit de la <variante> actuellement",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true,
|
||||
"variante": ["vodka", "rhum", "tequila", "whisky"]
|
||||
},
|
||||
{
|
||||
"id": 35,
|
||||
"question": "Les joueurs qui ont un <variante> dans leurs prénom",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true,
|
||||
"variante": ["a","e","i","o","u","y"]
|
||||
},
|
||||
{
|
||||
"id": 36,
|
||||
"question": "Le/La joueur/euse avec le plus gros cul",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 37,
|
||||
"question": "Celles/Ceux qui ont moins de <variante> ans",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true,
|
||||
"variante": ["21","22","23","24","25","26"]
|
||||
},
|
||||
{
|
||||
"id": 38,
|
||||
"question": "Celui/celle avec le plus gros appetit sexuel",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true,
|
||||
"caliente": true
|
||||
},
|
||||
{
|
||||
"id": 39,
|
||||
"question": "Ceux/Celles qui fumes (VapeNation compris)",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 40,
|
||||
"question": "Celles et ceux qui ont au moins un BAC +<variante>",
|
||||
"gorger": 1,
|
||||
"distribution": true,
|
||||
"recois": true,
|
||||
"variante": [0,1,2,3,4,5]
|
||||
},
|
||||
{
|
||||
"id": 41,
|
||||
"question": "Le premier joueur à se lever",
|
||||
"doubledistribution": true,
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 42,
|
||||
"question": "Ceux qui n'ont jamais eu l'occasion de faire un strip tease",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true,
|
||||
"caliente": true
|
||||
},
|
||||
{
|
||||
"id": 43,
|
||||
"question": "Le premier joueur à enlever un vêtements",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 44,
|
||||
"question": "Tous ceux qui ont déjà uriné dans une piscine ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 30,
|
||||
"question": "Celui/Celle avec le plus de follow sur <variante>",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true,
|
||||
"variante": ["instagram","facebook","tik-tok"]
|
||||
},
|
||||
{
|
||||
"id": 31,
|
||||
"question": "Celui/Celle avec le nom de famille le plus compliqué",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 32,
|
||||
"question": "Les joueurs qui n'ont pas encore distribué de gorgées",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
}, {
|
||||
"id": 33,
|
||||
"question": "Le premier joueur à donner l'heure",
|
||||
"doubledistribution": true,
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 34,
|
||||
"question": "Celles et ceux qui ont déjà dépenser plus de 2000 euros en un achat",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 35,
|
||||
"question": "La personne la moins courageuse",
|
||||
"gorger": 1,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 36,
|
||||
"question": "Celles/Ceux qui rentre chez eux à la fin de la soirée",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 37,
|
||||
"question": "Celles et ceux dont le jour d'anniversaire est un nombre <variante>",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true,
|
||||
"variante": ["impaire","paire"]
|
||||
},
|
||||
{
|
||||
"id": 38,
|
||||
"question": "Si tu as un téléphone qui a un prix supperieur d'achat a 1000Euros, tu est riche donc en tant que personne généreuse",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": false
|
||||
},
|
||||
{
|
||||
"id": 39,
|
||||
"question": "Tous ceux qui ont fait plus de 100km pour venir ici ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": false
|
||||
},
|
||||
{
|
||||
"id": 40,
|
||||
"jeux": true,
|
||||
"question": "Le jeu du revolver: Chaque joueur a maintenant 7 balles, une balle correspondant à une gorgée. Les joueurs ont la capacité de tirer des balles à tout moment du jeu.",
|
||||
"distribution": false,
|
||||
"recois": false
|
||||
},
|
||||
{
|
||||
"id": 41,
|
||||
"question": "<J1>",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 42,
|
||||
"jeux": true,
|
||||
"question": "<J1> est le vieu/vieille briscard ! Interdiction de montrer tes dents pendant <manche> manches",
|
||||
"manches": true,
|
||||
"arret": "Tu peux arreter de cacher tes belles dents"
|
||||
|
||||
},
|
||||
{
|
||||
"id": 43,
|
||||
"jeux": true,
|
||||
"question": "<J1> et <J2> liser le premier SMS qui s'affiche quand on tape <variante> dans la barre de recherche. le plus marrant",
|
||||
"gorger": 3,
|
||||
"variante": ["désolé","caca","bourré","mine","nazi"],
|
||||
"distribution": true,
|
||||
"recois": false
|
||||
}, {
|
||||
"id": 44,
|
||||
"jeux": true,
|
||||
"question": "A tour de role, vous avez exactement 3 secondes pour donner un mot en rapport avec le mots dit precedemment.<J1> tu commences en choissisant un mot. Le perdant",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 45,
|
||||
"jeux": true,
|
||||
"question": "Le jeu du PIM PAM POUM. Le premier qui perd ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 46,
|
||||
"jeux": true,
|
||||
"question": "<J1> defie <J2> au chifoumi ! Le perdant",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 47,
|
||||
"jeux": true,
|
||||
"question": "<J1> est dans le <variante> ! Tu dois parler au <variante> pendant <manches> manches ",
|
||||
"variante": ["passé", "futur"],
|
||||
"manches": true,
|
||||
"arret": "Tu est revenu dans le present",
|
||||
"distribution": false,
|
||||
"recois": false,
|
||||
"caliente": false
|
||||
},
|
||||
{
|
||||
"id": 48,
|
||||
"question": "<J1> tu bois autant de gorgées que tu as d'années d'études après le BAC"
|
||||
},
|
||||
{
|
||||
"id": 49,
|
||||
"jeux": true,
|
||||
"question": "<J1> et <J2> ferment leurs yeux ! Ils/Elles doivent deviner la couleur des yeux de l'autre. ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 50,
|
||||
"jeux": true,
|
||||
"question": "<J1> est manchot ! Il/Elle ne peut plus utiliser ses doigts durant <manches> manches . Si il/elle s'en sert, il/elle devra boire autant de gorgées qu'il/elle a utilisé de doigts",
|
||||
"distribution": false,
|
||||
"arret": "Tu n'es plus manchot",
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 51,
|
||||
"jeux": true,
|
||||
"question": "<J1> et <J2> , si vous êtes ensemble dans la vraie vie, vous pouvez distribuer 2 gorgées , autrement buvez-les"
|
||||
|
||||
},
|
||||
{
|
||||
"id": 52,
|
||||
"jeux": true,
|
||||
"question": "<J1> a la tourette ! A chaque fois que tu bois une gorgée, tu dois CRIER une insulte. C'est un stade avancé, ça dure <manches> manches",
|
||||
"manches": true,
|
||||
"arret": "Tu n'as plus tourette."
|
||||
|
||||
},
|
||||
{
|
||||
"id": 53,
|
||||
"jeux": true,
|
||||
"question": "<J1>, donne la couleur préférée de <J2> si tu te trompes",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 54,
|
||||
"jeux": true,
|
||||
"question": "<J1> à l'oeil de serpent ! Dès qu'un joueur te regarde dans les yeux, il/elle boit. Si tu es arrivé a faire boire personne avant <manches> manches, tu ",
|
||||
"gorger": 4,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
}, {
|
||||
"id": 55,
|
||||
"jeux": true,
|
||||
"question": "<J1> et <J2> se mesurent ! Le/la plus <variante>",
|
||||
"gorger": 3,
|
||||
"variante": ["petit","grand"],
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 56,
|
||||
"jeux": true,
|
||||
"question": "<J1> doit terminer toutes ses phrases par - <variante> pendant <manches> manches",
|
||||
"variante": ["C'est clair","han","quoicoubeh"]
|
||||
},
|
||||
{
|
||||
"id": 57,
|
||||
"jeux": true,
|
||||
"question": "<J1> et <J2> se défient au 'je te tiens, tu me tiens', le premier qui rit sera dechiré, et ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 58,
|
||||
"jeux": true,
|
||||
"question": "<J1> et <J2> n'ont plus le droit d'utiliser leur téléphone pendant <manches> manches !",
|
||||
"manches": "true",
|
||||
"arret": "vous pouvez enfin utiliser vos téléphone bande de geek"
|
||||
},
|
||||
{
|
||||
"id": 59,
|
||||
"jeux": true,
|
||||
"question": "<J1> et <J2> racontent une anecdote, celui/celle qui sort la plus <variante> ",
|
||||
"variante": ["banale","incroyable","marrante"],
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 60,
|
||||
"jeux": true,
|
||||
"question": "<J1>, Si on te dit Marco? ... Si tu as dis Polo ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 61,
|
||||
"jeux": true,
|
||||
"question": "<J1> est l'aigris pendant <manches> manches ! Dès que tu souris ou rigoles,",
|
||||
"gorger": 1,
|
||||
"manches": true,
|
||||
"distribution": false,
|
||||
"arret": "Tu n'es plus aigris!",
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 62,
|
||||
"jeux": true,
|
||||
"question": "<J1> fait un geste, le suivant répète et en ajoute un. Le perdant ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 63,
|
||||
"question": "<J1>, <J2> et <J3> vont désigner quelqu'un qui doit terminer son verre",
|
||||
"jeux": true
|
||||
},
|
||||
{
|
||||
"id": 64,
|
||||
"question": "Récitez l'alphabet en énonçant une lettre à tour de rôle. Si <J1> finit son verre avant, cul sec pour tout le monde !",
|
||||
"jeux": true
|
||||
},
|
||||
{
|
||||
"id": 65,
|
||||
"question": "Si <J1> arrive a finir son verre en moins de 5 secondes, il/elle ",
|
||||
"gorger": 6,
|
||||
"distribution": true,
|
||||
"recois": false,
|
||||
"jeux": true
|
||||
},
|
||||
{
|
||||
"id": 66,
|
||||
"jeux": true,
|
||||
"question": "<J1> et <J2> sont lies, si l'un boit alors l'autre aussi, et ce pendant <manches> manches",
|
||||
"manches": true,
|
||||
"arret": "Vous n'etes plus liés par le verre de l'amitié et plus.."
|
||||
},
|
||||
{
|
||||
"id": 67,
|
||||
"question": "<J1> dit un mot, la personne suivante le répète et en ajoute un nouveau, ainsi de suite jusqu'a ce que quelqu'un se trompe. Le perdant boit autant de gorgées qu'il y a eu de personne avant lui",
|
||||
"jeux": true
|
||||
},
|
||||
{
|
||||
"id": 68,
|
||||
"question": "<J1> doit choisir un mot que tout le monde devra dire à chaque fois qu'une personne boit. Pendant <manches> manches",
|
||||
"jeux": false,
|
||||
"manches": true,
|
||||
"arret": "Plus besoin de dire le mots avant de boire"
|
||||
},
|
||||
{
|
||||
"id": 69,
|
||||
"question": "Quand l'heure affichera un multiple de 10 (22h, 22h10 ...) le premier a crier 'merde j'ai oublié mon chat'",
|
||||
"gorger": 3,
|
||||
"distribut":false,
|
||||
"manches": true,
|
||||
"arret": "Vous avez retrouver le chat!"
|
||||
},
|
||||
{
|
||||
"id": 70,
|
||||
"question": "Plutôt ne plus avoir de mains ou de jambes? les perdants ",
|
||||
"gorger": 3,
|
||||
"jeux": false,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 71,
|
||||
"question": "Vive la poésie ! Nos phrases doivent rimer sous peine d'une gorgée pendant <manches> manches",
|
||||
"manches": true,
|
||||
"arret": "Vous ne devez plus faire de rime."
|
||||
},
|
||||
{
|
||||
"id": 72,
|
||||
"question": "Choisissez le joueur le <variante> drôle d'entre vous, ce dernier ",
|
||||
"variante": ["moins", "plus"],
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 73,
|
||||
"question": "Les <variante>",
|
||||
"variante": ["filles","garçons","couples","celibataires"],
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 74,
|
||||
"jeux": true,
|
||||
"question": "Plutôt avoir un tapis volant, ou un frigo qui se remplit tout seul ? Votez tous en même temps. La minorité ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true,
|
||||
"manches": false
|
||||
},
|
||||
{
|
||||
"id": 75,
|
||||
"question": "Plutôt avoir du temps ou de l'argent ? Votez tous en même temps. La minorité ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
|
||||
},
|
||||
{
|
||||
"id": 76,
|
||||
"question": "Le premier joueur qui en embrasse un autre sur la bouche",
|
||||
"gorger": 5,
|
||||
"distribution": true,
|
||||
"recois": false,
|
||||
"caliente": true
|
||||
},
|
||||
{
|
||||
"id": 77,
|
||||
"question": "Plutôt série ou film ? Votez tous en même temps. La minorité ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 78,
|
||||
"question": "Plutôt jeux-videos ou livre ? Votez tous en même temps. La minorité ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
|
||||
{
|
||||
"id": 79,
|
||||
"question": "Plutôt anime ou jeux-videos ? Votez tous en même temps. La minorité ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 80,
|
||||
"question": "Elisez le plus <variante> d'entre vous, ce dernier ",
|
||||
"variante": ["con", "intelligent", "beau", "gentil","dragueur","timide"],
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 81,
|
||||
"question": "Le premier qui donne un film de <variante> ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": false,
|
||||
"variante": ["Christopher Nolan","James Cameron","Tim Burton","Quentin tarantino","Steven Spielberg"]
|
||||
},
|
||||
{
|
||||
"id": 82,
|
||||
"question": "Le premier qui donne un film avec ",
|
||||
"variante": ["Christian Clavier","Morgan freeman","Brad Pitt", "Jean Reno","Marion Cotillard"],
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": false
|
||||
},
|
||||
{
|
||||
"id": 83,
|
||||
"question": "La première personne qui désigne le/la plus <variante> ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": false,
|
||||
"variante": ["jeune", "vieille"]
|
||||
},
|
||||
{
|
||||
"id": 84,
|
||||
"question": "Plutôt avoir des connaissances illimitées ou diriger le monde ? Votez tous en même temps. La minorité",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 85,
|
||||
"question": "Plutôt n'avoir aucun ami ou ne plus pouvoir utiliser d'appareil électronique ? Votez tous en même temps. La minorité ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 86,
|
||||
"question": "Plutot vaincre le patrikaka ou la polution dans le monde? Votez tous en meme temps. La minorité ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 87,
|
||||
"question": "Jeu du LUTIN : Pendant <manches> manches. Vous devez enlever le lutin de votre verre pour pouvoir boire et le remettre ensuite sinon vous devait reboire",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": false,
|
||||
"manches": true,
|
||||
"arret": "Le Lutin est parti. Vous pouvez boire normalement"
|
||||
},
|
||||
{
|
||||
"id": 88,
|
||||
"question": "Le premier joueur à ramener un objet <variante> (pas de vêtements) ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"variante": ["rouge","vert","bleu","jaune"],
|
||||
"recois": false,
|
||||
"manches": false
|
||||
},
|
||||
{
|
||||
"id": 89,
|
||||
"question": "Le premier joueur qui dévoile un de ses secrets et que personne ne sait ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": false
|
||||
},
|
||||
{
|
||||
"id": 90,
|
||||
"question": "Jeu des peaux! Triez vous du joueur le plus bronzé au joueur le moins bronzé. Le plus bronzé prend 1 gorgée, le second 2 gorgées, etc.",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 91,
|
||||
"question": "Plutôt avoir du pouvoir ou de la connaissance ? Votez tous en même temps. La minorité ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 92,
|
||||
"question": "Il est désormais interdit de se tutoyer pendant <manches> manches",
|
||||
"manches": true,
|
||||
"arret":"Vous pouvez vous enfin vous tutoyer"
|
||||
|
||||
},
|
||||
{
|
||||
"id": 93,
|
||||
"question": "Vaccin contre le COVID19 : Le DR Raoul à dit que boire un cul sec avait les mêmes effets que le vaccin. Tout le monde bois sont verre cul sec"
|
||||
},
|
||||
{
|
||||
"id": 94,
|
||||
"question": "Faites un concours de clash : Rap contenders entre <J1> et <J2> le perdant ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,809 @@
|
||||
{
|
||||
"version": "2",
|
||||
"questions": [
|
||||
{
|
||||
"id": 1,
|
||||
"question": "Celles/Ceux qui ont habité dans plus de 3 villes diferentes",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"question": "Ceux qui ont dansé aujourd'hui",
|
||||
"gorger": 1,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"question": "si tu n'as pas ton veritable nom sur insta",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"question": "si tu a des photos sur insta",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"question": "Les joueurs de Counter Strike ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"question": "La dernière personne à avoir vomi en soirée ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"question": "Toutes celles (ou ceux) qui ont du verni à ongles",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"question": "Tous les joueurs célibataires",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"question": "Tous ceux qui ont des lunettes",
|
||||
"gorger": 2,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"question": "Tous ceux qui ont déjà triché à un examen",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"question": "Le/La plus radin(e)",
|
||||
"gorger": 4,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"question": "<J1> a toi de juger : entre <J1> et <J2> qui stresse le plus pour un rien selon toi? Le perdant ",
|
||||
"gorger": 5,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
}, {
|
||||
"id": 12,
|
||||
"question": "Le mec qui a le plus gros ventre à bière ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"question": "Tous ceux qui se sont déjà fait exclure de cours",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"question": "<J1>, donne le nombre d'habitant du/de la <variante> ( à 1 000 000 près) Si tu as faux tu bois, sinon tu ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": false,
|
||||
"variante": ["Tadjikistant", "Monaco", "Belgique", "Suisse", "Allemagne", "Chine", "Inde"]
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"question": "Tous ceux qui ont des frères et soeurs",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"question": "<J1> a qui appartient le slogan suivant? <variante>",
|
||||
"variante": ["Des pâtes oui mais des (panzani)"," Le plaisir pour les petites faims. (Kinder Bueno)","Réveillez le lion qui est en vous. (Cereale lion)","Parce que le monde bouge (CIC)","Ça coule de source ! (Cristaline)", "Pensez différemment (apple)" ],
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"question": "Celles et ceux qui ont eu un Windows phone",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"question": "<J1>, Boire un café fait baisser le taux d'alcool? Si tu as faux ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"question": "Celles/Ceux qui se sont déjà battus",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"question": "Celui/Celle qui pèse le plus lourd",
|
||||
"variante": ["lourd","leger"],
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": false
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"question": "Pour se décoincer, le/la plus <variante>",
|
||||
"variante": ["timide", "enervé ", "angoissé","aigri"],
|
||||
"gorger": 2,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"question": "Le/La plus <variante>",
|
||||
"gorger": 3,
|
||||
"variante": ["jeune","vieille"],
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 23,
|
||||
"question": "Celles/Ceux qui ont fait des études <variante>",
|
||||
"gorger": 3,
|
||||
"variante": ["L","Scientifique", "Bac Professionel", "STMG"],
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"question": "Celles et ceux qui ont deja joué <variante> de maniere recurrente ",
|
||||
"gorger": 3,
|
||||
"variante": ["du piano","de la guitare", "du saxophone", "de la batterie"],
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 26,
|
||||
"question": "Les gens qui se sont masturbés aujourd'hui",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true,
|
||||
"caliente": true
|
||||
},
|
||||
{
|
||||
"id": 27,
|
||||
"question": "Celui ou celle a la meilleure place",
|
||||
"gorger": 2,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"question": "Celles et ceux qui n'ont jamais trompé leur partenaire",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 29,
|
||||
"question": "Celui/Celle avec les vêtements les plus beaux ",
|
||||
"gorger": 1,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 30,
|
||||
"question": "Celui/Celle qui a les cheveux les plus <variante> ",
|
||||
"gorger": 2,
|
||||
"variante": ["longs","courts"],
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 31,
|
||||
"question": "Les végans ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 32,
|
||||
"question": "La personne la plus maquillé ",
|
||||
"gorger": 2,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
}, {
|
||||
"id": 33,
|
||||
"question": "Celles/Ceux qui ont déjà appelé leur partenaire par le prénom de leurs ex",
|
||||
"gorger": 4,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 34,
|
||||
"question": "Celles et ceux qui boit de la <variante> actuellement",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true,
|
||||
"variante": ["vodka", "rhum", "tequila", "whisky"]
|
||||
},
|
||||
{
|
||||
"id": 35,
|
||||
"question": "Les joueurs qui ont un <variante> dans leurs prénom",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true,
|
||||
"variante": ["a","e","i","o","u","y"]
|
||||
},
|
||||
{
|
||||
"id": 36,
|
||||
"question": "Le/La joueur/euse avec le plus gros cul",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 37,
|
||||
"question": "Celles/Ceux qui ont moins de <variante> ans",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true,
|
||||
"variante": ["21","22","23","24","25","26"]
|
||||
},
|
||||
{
|
||||
"id": 38,
|
||||
"question": "Celui/celle avec le plus gros appetit sexuel",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true,
|
||||
"caliente": true
|
||||
},
|
||||
{
|
||||
"id": 39,
|
||||
"question": "Ceux/Celles qui fumes (VapeNation compris)",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 40,
|
||||
"question": "Celles et ceux qui ont au moins un BAC +<variante>",
|
||||
"gorger": 1,
|
||||
"distribution": true,
|
||||
"recois": true,
|
||||
"variante": [0,1,2,3,4,5]
|
||||
},
|
||||
{
|
||||
"id": 41,
|
||||
"question": "Le premier joueur à se lever",
|
||||
"doubledistribution": true,
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 42,
|
||||
"question": "Ceux qui n'ont jamais eu l'occasion de faire un strip tease",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true,
|
||||
"caliente": true
|
||||
},
|
||||
{
|
||||
"id": 43,
|
||||
"question": "Le premier joueur à enlever un vêtements",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 44,
|
||||
"question": "Tous ceux qui ont déjà uriné dans une piscine ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 30,
|
||||
"question": "Celui/Celle avec le plus de follow sur <variante>",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true,
|
||||
"variante": ["instagram","facebook","tik-tok"]
|
||||
},
|
||||
{
|
||||
"id": 31,
|
||||
"question": "Celui/Celle avec le nom de famille le plus compliqué",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 32,
|
||||
"question": "Les joueurs qui n'ont pas encore distribué de gorgées",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
}, {
|
||||
"id": 33,
|
||||
"question": "Le premier joueur à donner l'heure",
|
||||
"doubledistribution": true,
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 34,
|
||||
"question": "Celles et ceux qui ont déjà dépenser plus de 2000 euros en un achat",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 35,
|
||||
"question": "La personne la moins courageuse",
|
||||
"gorger": 1,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 36,
|
||||
"question": "Celles/Ceux qui rentre chez eux à la fin de la soirée",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 37,
|
||||
"question": "Celles et ceux dont le jour d'anniversaire est un nombre <variante>",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true,
|
||||
"variante": ["impaire","paire"]
|
||||
},
|
||||
{
|
||||
"id": 38,
|
||||
"question": "Si tu as un téléphone qui a un prix supperieur d'achat a 1000Euros, tu est riche donc en tant que personne généreuse",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": false
|
||||
},
|
||||
{
|
||||
"id": 39,
|
||||
"question": "Tous ceux qui ont fait plus de 100km pour venir ici ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": false
|
||||
},
|
||||
{
|
||||
"id": 40,
|
||||
"jeux": true,
|
||||
"question": "Le jeu du revolver: Chaque joueur a maintenant 7 balles, une balle correspondant à une gorgée. Les joueurs ont la capacité de tirer des balles à tout moment du jeu.",
|
||||
"distribution": false,
|
||||
"recois": false
|
||||
},
|
||||
{
|
||||
"id": 41,
|
||||
"question": "<J1>",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 42,
|
||||
"jeux": true,
|
||||
"question": "<J1> est le vieu/vieille briscard ! Interdiction de montrer tes dents pendant <manche> manches",
|
||||
"manche": true,
|
||||
"arret": "Tu peux arreter de cacher tes belles dents"
|
||||
|
||||
},
|
||||
{
|
||||
"id": 43,
|
||||
"jeux": true,
|
||||
"question": "<J1> et <J2> liser le premier SMS qui s'affiche quand on tape <variante> dans la barre de recherche. le plus marrant",
|
||||
"gorger": 3,
|
||||
"variante": ["désolé","caca","bourré","mine","nazi"],
|
||||
"distribution": true,
|
||||
"recois": false
|
||||
}, {
|
||||
"id": 44,
|
||||
"jeux": true,
|
||||
"question": "A tour de role, vous avez exactement 3 secondes pour donner un mot en rapport avec le mots dit precedemment.<J1> tu commences en choissisant un mot. Le perdant",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 45,
|
||||
"jeux": true,
|
||||
"question": "Le jeu du PIM PAM POUM. Le premier qui perd ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 46,
|
||||
"jeux": true,
|
||||
"question": "<J1> defie <J2> au chifoumi ! Le perdant",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 47,
|
||||
"jeux": true,
|
||||
"question": "<J1> est dans le <variante> ! Tu dois parler au <variante> pendant <manches> manches ",
|
||||
"variante": ["passé", "futur"],
|
||||
"manche": true,
|
||||
"arret": "Tu est revenu dans le present",
|
||||
"distribution": false,
|
||||
"recois": false,
|
||||
"caliente": false
|
||||
},
|
||||
{
|
||||
"id": 48,
|
||||
"question": "<J1> tu bois autant de gorgées que tu as d'années d'études après le BAC"
|
||||
},
|
||||
{
|
||||
"id": 49,
|
||||
"jeux": true,
|
||||
"question": "<J1> et <J2> ferment leurs yeux ! Ils/Elles doivent deviner la couleur des yeux de l'autre. ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 50,
|
||||
"jeux": true,
|
||||
"question": "<J1> est manchot ! Il/Elle ne peut plus utiliser ses doigts durant <manches> manches . Si il s'en sert, il/elle devra boire autant de gorgées qu'il/elle a utilisé de doigts",
|
||||
"distribution": false,
|
||||
"arret": "Tu n'es plus manchot",
|
||||
"recois": false
|
||||
},
|
||||
{
|
||||
"id": 51,
|
||||
"jeux": true,
|
||||
"question": "<J1> et <J2> , si vous êtes ensemble dans la vraie vie, vous pouvez distribuer 2 gorgées , autrement buvez-les"
|
||||
|
||||
},
|
||||
{
|
||||
"id": 52,
|
||||
"jeux": true,
|
||||
"question": "<J1> a la tourette ! A chaque fois que tu bois une gorgée, tu dois CRIER une insulte. C'est un stade avancé, ça dure <manches> manches",
|
||||
"manches": true,
|
||||
"arret": "Tu n'as plus tourette."
|
||||
|
||||
},
|
||||
{
|
||||
"id": 53,
|
||||
"jeux": true,
|
||||
"question": "<J1>, donne la couleur préférée de <J2> si tu te trompes",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 54,
|
||||
"jeux": true,
|
||||
"question": "<J1> à l'oeil de serpent ! Dès qu'un joueur te regarde dans les yeux, il/elle boit. Si tu es arrivé a faire boire personne avant <manches> manches, tu ",
|
||||
"gorger": 4,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
}, {
|
||||
"id": 55,
|
||||
"jeux": true,
|
||||
"question": "<J1> et <J2> se mesurent ! Le/la plus <variante>",
|
||||
"gorger": 3,
|
||||
"variante": ["petit","grand"],
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 56,
|
||||
"jeux": true,
|
||||
"question": "<J1> doit terminer toutes ses phrases par - <variante> pendant <manches> manches",
|
||||
"variante": ["C'est clair","han","quoicoubeh"]
|
||||
},
|
||||
{
|
||||
"id": 57,
|
||||
"jeux": true,
|
||||
"question": "<J1> et <J2> se défient au 'je te tiens, tu me tiens', le premier qui rit sera dechiré, et ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 58,
|
||||
"jeux": true,
|
||||
"question": "<J1> et <J2> n'ont plus le droit d'utiliser leur téléphone pendant <manches> manches !",
|
||||
"manches": "true"
|
||||
},
|
||||
{
|
||||
"id": 59,
|
||||
"jeux": true,
|
||||
"question": "<J1> et <J2> racontent une anecdote, celui/celle qui sort la plus <variante> ",
|
||||
"variante": ["banale","incroyable","marrante"],
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 60,
|
||||
"jeux": true,
|
||||
"question": "<J1>, Si on te dit Marco? ... Si tu as dis Polo ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 61,
|
||||
"jeux": true,
|
||||
"question": "<J1> est l'aigris pendant <manches> manches ! Dès que tu souris ou rigoles,",
|
||||
"gorger": 1,
|
||||
"manches": true,
|
||||
"distribution": false,
|
||||
"arret": "Tu n'es plus aigris!",
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 62,
|
||||
"jeux": true,
|
||||
"question": "<J1> fait un geste, le suivant répète et en ajoute un. Le perdant ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 63,
|
||||
"question": "<J1>, <J2> et <J3> vont désigner quelqu'un qui doit terminer son verre",
|
||||
"jeux": true
|
||||
},
|
||||
{
|
||||
"id": 64,
|
||||
"question": "Récitez l'alphabet en énonçant une lettre à tour de rôle. Si <J1> finit son verre avant, cul sec pour tout le monde !",
|
||||
"jeux": true
|
||||
},
|
||||
{
|
||||
"id": 65,
|
||||
"question": "Si <J1> arrive a finir son verre en moins de 5 secondes, il/elle ",
|
||||
"gorger": 6,
|
||||
"distribution": true,
|
||||
"recois": false,
|
||||
"jeux": true
|
||||
},
|
||||
{
|
||||
"id": 66,
|
||||
"jeux": true,
|
||||
"question": "<J1> et <J2> sont lies, si l'un boit alors l'autre aussi, et ce pendant <manches> manches",
|
||||
"manches": true
|
||||
},
|
||||
{
|
||||
"id": 67,
|
||||
"question": "<J1> dit un mot, la personne suivante le répète et en ajoute un nouveau, ainsi de suite jusqu'a ce que quelqu'un se trompe. Le perdant boit autant de gorgées qu'il y a eu de personne avant lui",
|
||||
"jeux": true
|
||||
},
|
||||
{
|
||||
"id": 68,
|
||||
"question": "<J1> doit choisir un mot que tout le monde devra dire à chaque fois qu'une personne boit. Pendant <manches> manches",
|
||||
"jeux": false,
|
||||
"manches": true,
|
||||
"arret": "Plus besoin de dire le mots avant de boire"
|
||||
},
|
||||
{
|
||||
"id": 69,
|
||||
"question": "Quand l'heure affichera un multiple de 10 (22h, 22h10 ...) le premier a crier 'merde j'ai oublié mon chat'",
|
||||
"gorger": 3,
|
||||
"distribut":false,
|
||||
"manches": true,
|
||||
"arret": "Vous avez retrouver le chat!"
|
||||
},
|
||||
{
|
||||
"id": 70,
|
||||
"question": "Plutôt ne plus avoir de mains ou de jambes? les perdants ",
|
||||
"gorger": 3,
|
||||
"jeux": false,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 71,
|
||||
"question": "Vive la poésie ! Nos phrases doivent rimer sous peine d'une gorgée pendant <manches> manches",
|
||||
"manches": true,
|
||||
"arret": "Vous ne devez plus faire de rime."
|
||||
},
|
||||
{
|
||||
"id": 72,
|
||||
"question": "Choisissez le joueur le <variante> drôle d'entre vous, ce dernier ",
|
||||
"variante": ["moins", "plus"],
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 73,
|
||||
"question": "Les <variante>",
|
||||
"variante": ["filles","garçons","couples","celibataires"],
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 74,
|
||||
"jeux": true,
|
||||
"question": "Plutôt avoir un tapis volant, ou un frigo qui se remplit tout seul ? Votez tous en même temps. La minorité ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true,
|
||||
"manches": false
|
||||
},
|
||||
{
|
||||
"id": 75,
|
||||
"question": "Plutôt avoir du temps ou de l'argent ? Votez tous en même temps. La minorité ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
|
||||
},
|
||||
{
|
||||
"id": 76,
|
||||
"question": "Le premier joueur qui en embrasse un autre sur la bouche",
|
||||
"gorger": 5,
|
||||
"distribution": true,
|
||||
"recois": false,
|
||||
"caliente": true
|
||||
},
|
||||
{
|
||||
"id": 77,
|
||||
"question": "Plutôt série ou film ? Votez tous en même temps. La minorité ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 78,
|
||||
"question": "Plutôt jeux-videos ou livre ? Votez tous en même temps. La minorité ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
|
||||
{
|
||||
"id": 79,
|
||||
"question": "Plutôt anime ou jeux-videos ? Votez tous en même temps. La minorité ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 80,
|
||||
"question": "Elisez le plus <variante> d'entre vous, ce dernier ",
|
||||
"variante": ["con", "intelligent", "beau", "gentil","dragueur","timide"],
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 81,
|
||||
"question": "Le premier qui donne un film de <variante> ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": false,
|
||||
"variante": ["Christopher Nolan","James Cameron","Tim Burton","Quentin tarantino","Steven Spielberg"]
|
||||
},
|
||||
{
|
||||
"id": 82,
|
||||
"question": "Le premier qui donne un film avec ",
|
||||
"variante": ["Christian Clavier","Morgan freeman","Brad Pitt", "Jean Reno","Marion Cotillard"],
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": false
|
||||
},
|
||||
{
|
||||
"id": 83,
|
||||
"question": "La première personne qui désigne le/la plus <variante> ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": false,
|
||||
"variante": ["jeune", "vieille"]
|
||||
},
|
||||
{
|
||||
"id": 84,
|
||||
"question": "Plutôt avoir des connaissances illimitées ou diriger le monde ? Votez tous en même temps. La minorité",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 85,
|
||||
"question": "Plutôt n'avoir aucun ami ou ne plus pouvoir utiliser d'appareil électronique ? Votez tous en même temps. La minorité ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 86,
|
||||
"question": "Plutot vaincre le patrikaka ou la polution dans le monde? Votez tous en meme temps. La minorité ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 87,
|
||||
"question": "Jeu du LUTIN : Pendant <manches> manches. Vous devez enlever le lutin de votre verre pour pouvoir boire et le remettre ensuite sinon vous devait reboire",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": false,
|
||||
"manches": true,
|
||||
"arret": "Le Lutin est parti. Vous pouvez boire normalement"
|
||||
},
|
||||
{
|
||||
"id": 88,
|
||||
"question": "Le premier joueur à ramener un objet <variante> (pas de vêtements) ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"variante": ["rouge","vert","bleu","jaune"],
|
||||
"recois": false,
|
||||
"manches": false
|
||||
},
|
||||
{
|
||||
"id": 89,
|
||||
"question": "Le premier joueur qui dévoile un de ses secrets et que personne ne sait ",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": false
|
||||
},
|
||||
{
|
||||
"id": 90,
|
||||
"question": "Jeu des peaux! Triez vous du joueur le plus bronzé au joueur le moins bronzé. Le plus bronzé prend 1 gorgée, le second 2 gorgées, etc.",
|
||||
"gorger": 3,
|
||||
"distribution": true,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 91,
|
||||
"question": "Plutôt avoir du pouvoir ou de la connaissance ? Votez tous en même temps. La minorité ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
},
|
||||
{
|
||||
"id": 92,
|
||||
"question": "Il est désormais interdit de se tutoyer pendant <manches> manches",
|
||||
"manches": true,
|
||||
"arret":"Vous pouvez vous tutoyer"
|
||||
|
||||
},
|
||||
{
|
||||
"id": 93,
|
||||
"question": "Vaccin contre le COVID19 : Le DR Raoul à dit que boire un cul sec avait les mêmes effets que le vaccin. Tout le monde bois sont verre cul sec"
|
||||
},
|
||||
{
|
||||
"id": 94,
|
||||
"question": "Faites un concours de clash : Rap contenders entre <J1> et <J2> le perdant ",
|
||||
"gorger": 3,
|
||||
"distribution": false,
|
||||
"recois": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.example.boidelov3;
|
||||
|
||||
//public class ChatGPTTask extends AsyncTask<Void, Void, String> {
|
||||
//// private Jeux jeuxActivity;
|
||||
//// private String keyOpenai;
|
||||
////
|
||||
//// public ChatGPTTask(Jeux jeuxActivity, String keyOpenai) {
|
||||
//// this.jeuxActivity = jeuxActivity;
|
||||
//// this.keyOpenai = keyOpenai;
|
||||
//// }
|
||||
////
|
||||
////
|
||||
//// @Override
|
||||
//// protected String doInBackground(Void... voids) {
|
||||
//// String url = "https://api.openai.com/v1/chat/completions";
|
||||
//// String apiKey = keyOpenai;
|
||||
//// System.out.println("apiKey de ChatGPTTASK.java: " + apiKey);
|
||||
//// String model = "gpt-3.5-turbo";
|
||||
////
|
||||
//// String prompt = "Tu es une IA française qui génère des questions ainsi que la categories de la question. Voici des exemples :" +
|
||||
//// "Celles/Ceux qui ont habité dans plus de 3 villes diferentes';'La vie" +
|
||||
//// "Ceux qui ont dansé aujourd'hui' ; 'Soirée'" +
|
||||
//// "'Pour se décoincer, le/la plus timide' ; 'Caractère'" +
|
||||
//// "'Celles et ceux qui ont déjà dépenser plus de 2000 euros en un achat' ; 'Dépense'" +
|
||||
//// "'Le/La plus radin(e)' ; 'Caractère'";
|
||||
//
|
||||
//// try {
|
||||
//// URL obj = new URL(url);
|
||||
//// HttpURLConnection connection = (HttpURLConnection) obj.openConnection();
|
||||
//// connection.setRequestMethod("POST");
|
||||
//// connection.setRequestProperty("Authorization", "Bearer " + apiKey);
|
||||
//// connection.setRequestProperty("Content-Type", "application/json");
|
||||
////
|
||||
//// // The request body
|
||||
//// String body = "{\"model\": \"" + model + "\", \"messages\": [{\"role\": \"user\", \"content\": \"" + prompt + "\"}]}";
|
||||
//// System.out.println("body: " + body);
|
||||
//// connection.setDoOutput(true);
|
||||
//// OutputStreamWriter writer = new OutputStreamWriter(connection.getOutputStream());
|
||||
//// writer.write(body);
|
||||
//// writer.flush();
|
||||
//// writer.close();
|
||||
////
|
||||
//// // Response from ChatGPT
|
||||
//// BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream()));
|
||||
//// String line;
|
||||
////
|
||||
//// StringBuffer response = new StringBuffer();
|
||||
////
|
||||
//// while ((line = br.readLine()) != null) {
|
||||
//// response.append(line);
|
||||
//// }
|
||||
//// br.close();
|
||||
////
|
||||
//// // calls the method to extract the message.
|
||||
//// return extractMessageFromJSONResponse(response.toString());
|
||||
////
|
||||
//// } catch (IOException e) {
|
||||
//// System.out.println("Il y a eu une erreur" + e);
|
||||
//// throw new RuntimeException(e);
|
||||
////
|
||||
//// }
|
||||
//// }
|
||||
////
|
||||
//// public String extractMessageFromJSONResponse(String response) {
|
||||
//// int start = response.indexOf("content") + 11;
|
||||
//// int end = response.indexOf("\"", start);
|
||||
//// String extractedMessage = response.substring(start, end);
|
||||
//// System.out.println("extractedMessage: " + extractedMessage);
|
||||
//// return extractedMessage;
|
||||
//// }
|
||||
////
|
||||
//// @Override
|
||||
//// protected void onPostExecute(String result) {
|
||||
//// if (result != null) {
|
||||
//// // Handle the extracted message here
|
||||
//// jeuxActivity.handleExtractedMessage(result);
|
||||
//// } else {
|
||||
//// Toast.makeText(jeuxActivity.getApplicationContext(), "Échec de la communication avec l'API !", Toast.LENGTH_SHORT).show();
|
||||
//// jeuxActivity.navigateToJeuxParametres();
|
||||
//// }
|
||||
//// }
|
||||
//
|
||||
//
|
||||
// return url;
|
||||
// }}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.example.boidelov3;
|
||||
|
||||
import android.os.AsyncTask;
|
||||
|
||||
import com.impossibl.postgres.api.jdbc.PGConnection;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class DatabaseConnection extends AsyncTask<Void, Void, PGConnection> {
|
||||
private static final String DB_URL = "jdbc:postgresql://82.65.214.214:5432/boidelo";
|
||||
private static final String USER = "Tux2543";
|
||||
private static final String PASSWORD = "6wa*teCnuxsG#grAc5HzC!Rh%#@c&";
|
||||
|
||||
@Override
|
||||
protected PGConnection doInBackground(Void... params) {
|
||||
PGConnection connection = null;
|
||||
try {
|
||||
// Code de connexion à la base de données PostgreSQL
|
||||
String url = DB_URL;
|
||||
String username = USER;
|
||||
String password = PASSWORD;
|
||||
connection = (PGConnection) DriverManager.getConnection(url, username, password);
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return connection;
|
||||
}
|
||||
|
||||
|
||||
protected void onPostExecute(Connection connection) {
|
||||
// Traitez le résultat de la connexion ici
|
||||
if (connection != null) {
|
||||
// Connexion réussie
|
||||
} else {
|
||||
// Échec de la connexion
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,261 @@
|
||||
package com.example.boidelov3;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
public class Jeux extends AppCompatActivity {
|
||||
private TextView questionTextView;
|
||||
private Button suivantButton;
|
||||
private Questions questions;
|
||||
|
||||
private List<String> toutlesjoueurs;
|
||||
private int nombreQuestions;
|
||||
private int ajoutGorgees;
|
||||
boolean openAI;
|
||||
int ratiOpenai;
|
||||
String keyOpenai, phraseGPTString;
|
||||
|
||||
private List<Question> questionsAvecManches = new ArrayList<>();
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_jeux);
|
||||
|
||||
// Récupération des données passées par l'activité précédente
|
||||
toutlesjoueurs = getIntent().getStringArrayListExtra("EXTRA_LIST_JOUEUR");
|
||||
nombreQuestions = getIntent().getIntExtra("EXTRA_NOMBRE_QUESTIONS", 50);
|
||||
ajoutGorgees = getIntent().getIntExtra("EXTRA_AJOUT_GORGEE", 0);
|
||||
openAI = getIntent().getBooleanExtra("EXTRA_OPENAI", false);
|
||||
ratiOpenai = getIntent().getIntExtra("EXTRA_RATIO_OPENAI", 0);
|
||||
keyOpenai = getIntent().getStringExtra("EXTRA_KEY_OPENAI");
|
||||
|
||||
|
||||
questionTextView = findViewById(R.id.textView1);
|
||||
suivantButton = findViewById(R.id.button);
|
||||
|
||||
// Lecture du fichier JSON et conversion en objet Questions
|
||||
try {
|
||||
InputStream is = getAssets().open("question.json");
|
||||
int size = is.available();
|
||||
byte[] buffer = new byte[size];
|
||||
is.read(buffer);
|
||||
is.close();
|
||||
String json = new String(buffer, "UTF-8");
|
||||
|
||||
Gson gson = new Gson();
|
||||
questions = gson.fromJson(json, Questions.class);
|
||||
} catch (IOException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
// Affichage d'une question au lancement de l'activité
|
||||
updateQuestion();
|
||||
|
||||
suivantButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
updateQuestion();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Méthode pour mettre à jour la question affichée
|
||||
private void updateQuestion() {
|
||||
|
||||
// Mettre à jour le compte des manches pour toutes les questions avec manches
|
||||
Iterator<Question> iterator = questionsAvecManches.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
Question mancheQuestion = iterator.next();
|
||||
mancheQuestion.setManchesRestantes(mancheQuestion.getManchesRestantes() - 1);
|
||||
System.out.println("Nombre de manches restantes : " + mancheQuestion.getManchesRestantes() + " pour l'arret : " + mancheQuestion.getArretMessageManche());
|
||||
|
||||
|
||||
if (mancheQuestion.getManchesRestantes() <= 0) {
|
||||
// Afficher le message d'arrêt pour cette question
|
||||
questionTextView.setText(mancheQuestion.getArretMessageManche());
|
||||
iterator.remove(); // Retirer la question de la liste des manches actives
|
||||
//fond d'ecran en jaune
|
||||
View view = this.getWindow().getDecorView();
|
||||
view.setBackgroundColor (0xFFFFFF00);
|
||||
return; // Arrêter la mise à jour ici pour afficher le message d'arrêt
|
||||
}
|
||||
}
|
||||
Question question = getRandomQuestion();
|
||||
if (question != null) {
|
||||
questionTextView.setText(Html.fromHtml(question.getQuestion(), Html.FROM_HTML_MODE_LEGACY));
|
||||
} else {
|
||||
questionTextView.setText("Toutes les questions ont été posées.");
|
||||
suivantButton.setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
// Méthode pour naviguer vers l'activité JeuxParametres en cas d'échec de la communication avec l'API
|
||||
public void navigateToJeuxParametres() {
|
||||
Intent intent = new Intent(Jeux.this, JeuxParametres.class);
|
||||
Toast.makeText(getApplicationContext(), "Échec de la communication avec l'API !", Toast.LENGTH_SHORT).show();
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
// Méthode pour sélectionner trois joueurs aléatoires différents
|
||||
public List<String> TroisJoueurAleatoire(List<String> toutlesjoueurs) {
|
||||
Set<String> setJoueur = new HashSet<>();
|
||||
Random rand = new Random();
|
||||
|
||||
while (setJoueur.size() < 3) {
|
||||
setJoueur.add(toutlesjoueurs.get(rand.nextInt(toutlesjoueurs.size())));
|
||||
}
|
||||
|
||||
return new ArrayList<>(setJoueur);
|
||||
}
|
||||
|
||||
|
||||
private String getArretById(int id) {
|
||||
for (Question question : questions.getQuestions()) {
|
||||
if (question.getId() == id) {
|
||||
return question.getArret();
|
||||
}
|
||||
}
|
||||
return null; // Retourne null si aucun objet Question avec l'ID donné n'est trouvé
|
||||
}
|
||||
|
||||
// Méthode pour obtenir une question aléatoire qui n'a pas encore été posée
|
||||
private Question getRandomQuestion() {
|
||||
if (questions != null) {
|
||||
|
||||
SharedPreferences prefs = getSharedPreferences("app", Context.MODE_PRIVATE);
|
||||
Set<String> askedQuestions = prefs.getStringSet("askedQuestions", new HashSet<String>());
|
||||
|
||||
List<Question> unaskedQuestions = new ArrayList<>();
|
||||
for (Question question : questions.getQuestions()) {
|
||||
if (!askedQuestions.contains(String.valueOf(question.getId()))) {
|
||||
unaskedQuestions.add(question);
|
||||
}
|
||||
}
|
||||
|
||||
if (unaskedQuestions.isEmpty()) {
|
||||
questionTextView.setText("Toutes les questions ont été posées.");
|
||||
//remplacement du fond d'écran en Rouge
|
||||
View view = this.getWindow().getDecorView();
|
||||
view.setBackgroundColor (0xFFFF0000);
|
||||
|
||||
suivantButton.setEnabled(false);
|
||||
return null; // Aucune question n'est disponible
|
||||
}
|
||||
|
||||
Random random = new Random();
|
||||
Question question = unaskedQuestions.get(random.nextInt(unaskedQuestions.size()));
|
||||
askedQuestions.add(String.valueOf(question.getId()));
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
editor.putStringSet("askedQuestions", askedQuestions);
|
||||
editor.apply();
|
||||
//fond d'ecran en blanc pour la question suivante
|
||||
View view = this.getWindow().getDecorView();
|
||||
view.setBackgroundColor (0xFFFFFFFF);
|
||||
|
||||
String questionText = question.getQuestion();
|
||||
|
||||
// Choix d'une variante aléatoire si elle existe
|
||||
if (question.getVariante() != null && !question.getVariante().isEmpty()) {
|
||||
String chosenVariante = question.getVariante().get(random.nextInt(question.getVariante().size()));
|
||||
questionText = questionText.replace("<variante>", chosenVariante);
|
||||
}
|
||||
|
||||
// Définir le nombre de manches
|
||||
if (questionText.contains("<manches>")) {
|
||||
//fond d'ecran en bleu pour la question suivante
|
||||
View view1 = this.getWindow().getDecorView();
|
||||
view1.setBackgroundColor (0xFF0000FF);
|
||||
int nbaleatoiremanches = random.nextInt(10) + 5;
|
||||
questionText = questionText.replace("<manches>", String.valueOf(nbaleatoiremanches));
|
||||
question.setManchesRestantes(nbaleatoiremanches);
|
||||
//System.out.println("Nombre de manches : " + nbaleatoiremanches);
|
||||
|
||||
//System.out.println("Message d'arrêt pour la question : " + question.getArretMessage());
|
||||
String stopid = getArretById(question.getId());
|
||||
//System.out.println("Message d'arrêt : " + stopid);
|
||||
//System.out.println("affiche l'id de la question : " + question.getId());
|
||||
//enregistrement du message d'arrêt pour la question
|
||||
|
||||
|
||||
question.setArretMessageManche("Fin de défi! \n"+ stopid); // message d'arret pour la question avec manches
|
||||
questionsAvecManches.add(question);
|
||||
}
|
||||
// Définir les joueurs
|
||||
boolean isJoueurs1 = questionText.contains("<J1>");
|
||||
boolean isJoueurs2 = questionText.contains("<J2>");
|
||||
boolean isJoueurs3 = questionText.contains("<J3>");
|
||||
List aleatoirejoueurs = TroisJoueurAleatoire(toutlesjoueurs);
|
||||
if (isJoueurs1 && isJoueurs2 && isJoueurs3) {
|
||||
//fond d'ecran en vert foncé pour la question suivante
|
||||
View view2 = this.getWindow().getDecorView();
|
||||
view2.setBackgroundColor (Color.argb(255, 0, 100, 0));
|
||||
questionText = questionText.replace("<J1>", String.valueOf(aleatoirejoueurs.get(0)));
|
||||
questionText = questionText.replace("<J2>", String.valueOf(aleatoirejoueurs.get(1)));
|
||||
questionText = questionText.replace("<J3>", String.valueOf(aleatoirejoueurs.get(2)));
|
||||
} else if (isJoueurs1 && isJoueurs2) {
|
||||
//fond d'ecran en vert pour la question suivante
|
||||
View view2 = this.getWindow().getDecorView();
|
||||
view2.setBackgroundColor (Color.argb(255, 0, 255, 0));
|
||||
questionText = questionText.replace("<J1>", String.valueOf(aleatoirejoueurs.get(0)));
|
||||
questionText = questionText.replace("<J2>", String.valueOf(aleatoirejoueurs.get(1)));
|
||||
} else if (isJoueurs1) {
|
||||
//fond d'ecran en vert clair pour la question suivante
|
||||
View view2 = this.getWindow().getDecorView();
|
||||
view2.setBackgroundColor (Color.argb(255, 144, 238, 144));
|
||||
questionText = questionText.replace("<J1>", String.valueOf(aleatoirejoueurs.get(0)));
|
||||
}
|
||||
|
||||
// Ajouter les gorgés
|
||||
if (question.isDistribution() || question.isRecois()) {
|
||||
if (question.isRecois() && question.isDistribution()) {
|
||||
boolean rand = random.nextBoolean();
|
||||
if (rand) {
|
||||
questionText = questionText.concat(" <b>bois</b>");
|
||||
} else {
|
||||
questionText = questionText.concat(" <b>distribue</b>");
|
||||
}
|
||||
} else if (question.isRecois()) {
|
||||
questionText = questionText.concat(" <b>bois</b>");
|
||||
} else if (question.isDistribution()) {
|
||||
//mot en bold pour le concat "distribue"
|
||||
|
||||
questionText = questionText.concat(" <b>distribue</b>");
|
||||
}
|
||||
|
||||
questionText = questionText.concat(" " + (question.getGorger() + ajoutGorgees) + " gorger.");
|
||||
}
|
||||
|
||||
question.setQuestion(questionText);
|
||||
//System.out.println(questionText);
|
||||
return question;
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,324 @@
|
||||
package com.example.boidelov3;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import okhttp3.Call;
|
||||
import okhttp3.Callback;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
|
||||
public class JeuxParametres extends AppCompatActivity {
|
||||
|
||||
private SeekBar seekBar1, seekBar2, seekBar3;
|
||||
private TextView textView1, textView2, textView5, textViewRatioGen;
|
||||
private CheckBox checkBox, checkBoxGPT;
|
||||
private EditText editText, editTextKeyGPT;
|
||||
private String keyGPT;
|
||||
private int nbQuestions;
|
||||
|
||||
private List<String> toutlesjoueurs;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
toutlesjoueurs = getIntent().getStringArrayListExtra("EXTRA_LIST_JOUEUR");
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_jeux_parametres);
|
||||
|
||||
// Initialisation des vues
|
||||
seekBar1 = findViewById(R.id.seekBar1);
|
||||
seekBar2 = findViewById(R.id.seekBar2);
|
||||
seekBar3 = findViewById(R.id.seekBar3);
|
||||
textView1 = findViewById(R.id.textView1);
|
||||
textView2 = findViewById(R.id.textView2);
|
||||
textView5 = findViewById(R.id.textView5);
|
||||
editTextKeyGPT = findViewById(R.id.editTextGPT);
|
||||
textViewRatioGen = findViewById(R.id.textViewRatioGen);
|
||||
|
||||
Button buttonTestApi = findViewById(R.id.ButtonTestApi);
|
||||
|
||||
// Configuration de la seekBar1
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
seekBar1.setMin(20);
|
||||
}
|
||||
seekBar1.setMax(150);
|
||||
seekBar1.setProgress(50);
|
||||
|
||||
// Configuration de la seekBar2
|
||||
seekBar2.setMax(20);
|
||||
seekBar2.setProgress(0);
|
||||
|
||||
// Configuration de la seekBar3
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
seekBar2.setMin(0);
|
||||
seekBar3.setMin(1);
|
||||
}
|
||||
seekBar3.setMax(15);
|
||||
seekBar3.setProgress(8);
|
||||
|
||||
// Configuration des listeners pour les seekBars
|
||||
seekBar1.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
|
||||
@Override
|
||||
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||
// Ajustement de la valeur au multiple de 10 le plus proche
|
||||
int adjustedProgress = Math.round(progress / 10) * 10;
|
||||
seekBar.setProgress(adjustedProgress);
|
||||
textView1.setText("Nombre de questions avant la fin de partie : " + adjustedProgress);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStartTrackingTouch(SeekBar seekBar) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||
}
|
||||
});
|
||||
|
||||
seekBar2.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
|
||||
@Override
|
||||
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||
// Mise à jour du textView2 en fonction de la valeur de la seekBar2
|
||||
textView2.setText("Ajout de gorgées : " + progress);
|
||||
// Mise à jour du textView5 en fonction de la valeur de la seekBar2
|
||||
switch (progress) {
|
||||
case 0:
|
||||
textView5.setText("Palier : Grosse merde");
|
||||
break;
|
||||
case 2:
|
||||
textView5.setText("Palier : Petite merde");
|
||||
break;
|
||||
case 4:
|
||||
textView5.setText("Palier : Petit joueur");
|
||||
break;
|
||||
case 6:
|
||||
textView5.setText("Palier : Un p'tit verre ?!");
|
||||
break;
|
||||
case 8:
|
||||
textView5.setText("Palier : ça commence à aller");
|
||||
break;
|
||||
case 10:
|
||||
textView5.setText("Palier : Alcoolique");
|
||||
break;
|
||||
case 12:
|
||||
textView5.setText("Palier : COMA ETHYLIX");
|
||||
break;
|
||||
case 13:
|
||||
textView5.setText("Palier : APÉROOOOO !!");
|
||||
break;
|
||||
case 14:
|
||||
textView5.setText("Palier : LA J'SUIS BIENG");
|
||||
break;
|
||||
case 15:
|
||||
textView5.setText("Palier : J'VOIS PLUS RIENG");
|
||||
break;
|
||||
case 17:
|
||||
textView5.setText("Palier : J'AI PLUS DE VERRES");
|
||||
break;
|
||||
case 18 :
|
||||
textView5.setText("Palier : Soirée Murge");
|
||||
break;
|
||||
case 19:
|
||||
textView5.setText("Palier : Soirée Pétée");
|
||||
break;
|
||||
case 20:
|
||||
textView5.setText("Palier : L'ENDER DRAGON");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStartTrackingTouch(SeekBar seekBar) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||
}
|
||||
});
|
||||
|
||||
// Configuration du checkBox // Q : IL sert a quoi ?
|
||||
// R : Il sert à activer/désactiver les vues en dessous
|
||||
|
||||
checkBox = findViewById(R.id.checkBoxGPT);
|
||||
checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
// Activation/désactivation des vues en fonction de l'état du checkBox
|
||||
editTextKeyGPT.setEnabled(isChecked);
|
||||
//editText.setEnabled(isChecked);
|
||||
textViewRatioGen.setEnabled(isChecked);
|
||||
seekBar3.setEnabled(isChecked);
|
||||
buttonTestApi.setEnabled(isChecked);
|
||||
}
|
||||
});
|
||||
|
||||
// Configuration de la seekBar3
|
||||
seekBar3.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
|
||||
@Override
|
||||
public void onProgressChanged(SeekBar seekBar3, int progress, boolean fromUser) {
|
||||
textViewRatioGen.setText("Ratio BDD/OPENAI : 1/" + progress);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStartTrackingTouch(SeekBar seekBar3) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopTrackingTouch(SeekBar seekBar3) {
|
||||
}
|
||||
});
|
||||
|
||||
// Partie OpenAI : enregistrement de la clé en dur.
|
||||
checkBoxGPT = findViewById(R.id.checkBoxGPT);
|
||||
// Récupérer une instance des SharedPreferences
|
||||
SharedPreferences sharedPreferences = getSharedPreferences("MyPrefs", MODE_PRIVATE);
|
||||
final SharedPreferences.Editor editor = sharedPreferences.edit();
|
||||
// Récupérer l'EditText
|
||||
final EditText editText = findViewById(R.id.editTextGPT);
|
||||
// Récupérer la valeur enregistrée dans les SharedPreferences
|
||||
String apiKey = editText.getText().toString();
|
||||
|
||||
// Récupérer la valeur enregistrée dans les SharedPreferences
|
||||
String savedText = sharedPreferences.getString("savedText", "");
|
||||
editText.setText(savedText);
|
||||
|
||||
// Enregistrer le contenu de l'EditText lorsque l'utilisateur modifie le texte
|
||||
editText.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
// Enregistrer le texte dans les SharedPreferences
|
||||
editor.putString("savedText", editText.getText().toString());
|
||||
editor.apply();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void onClickButtonTestAPI(View view) {
|
||||
|
||||
String apiKey = editTextKeyGPT.getText().toString();
|
||||
// Créer un client OkHttpClient pour effectuer la requête
|
||||
OkHttpClient client = new OkHttpClient();
|
||||
|
||||
// Construire la requête d'essai vers l'API
|
||||
Request request = new Request.Builder()
|
||||
.url("https://api.openai.com/v1/engines/davinci") // Endpoint d'essai, vous pouvez le modifier selon vos besoins
|
||||
.header("Authorization", "Bearer " + apiKey) // Ajouter la clé API dans l'en-tête de la requête
|
||||
.build();
|
||||
|
||||
// Exécuter la requête de test
|
||||
client.newCall(request).enqueue(new Callback() {
|
||||
@Override
|
||||
public void onFailure(@NonNull Call call, IOException e) {
|
||||
// Gérer les erreurs de requête
|
||||
e.printStackTrace();
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getApplicationContext(), "Échec de la communication avec l'API !", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResponse(Call call, Response response) throws IOException {
|
||||
// Vérifier le code de réponse de la requête
|
||||
if (response.isSuccessful()) {
|
||||
// La clé API est valide et l'API a répondu avec succès
|
||||
// Vous pouvez effectuer d'autres opérations ici
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getApplicationContext(), "Communication avec l'API réussie !", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// La clé API est invalide ou il y a eu une erreur de communication avec l'API
|
||||
System.out.println("Échec de la communication avec l'API !");
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getApplicationContext(), "Échec de la communication avec l'API !", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
response.close();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void onClickButtonStart(View view) {
|
||||
// Récupérer les paramètres de la partie
|
||||
int nombreQuestions = seekBar1.getProgress();
|
||||
int ajoutGorgees = seekBar2.getProgress();
|
||||
int ratioBddOpenAI = seekBar3.getProgress();
|
||||
checkBoxGPT = findViewById(R.id.checkBoxGPT);
|
||||
boolean openAI = checkBoxGPT.isChecked();
|
||||
|
||||
toutlesjoueurs = getIntent().getStringArrayListExtra("EXTRA_LIST_JOUEUR");
|
||||
// Récupérer les joueurs (vous devrez définir comment vous les récupérez)
|
||||
SharedPreferences sharedPreferences = getSharedPreferences("Joueurs", Context.MODE_PRIVATE);
|
||||
ArrayList<String> joueurs = new ArrayList<>();
|
||||
|
||||
for (int i = 1; i <= 3; i++) {
|
||||
String joueur = sharedPreferences.getString("J" + i, "");
|
||||
if (!joueur.isEmpty()) {
|
||||
joueurs.add(joueur);
|
||||
}
|
||||
}
|
||||
|
||||
// Récupérer les joueurs supplémentaires en utilisant une boucle
|
||||
int i = 4;
|
||||
String nomJoueur = sharedPreferences.getString("J" + i, "");
|
||||
while (!nomJoueur.isEmpty()) {
|
||||
joueurs.add(nomJoueur);
|
||||
i++;
|
||||
nomJoueur = sharedPreferences.getString("J" + i, "");
|
||||
}
|
||||
|
||||
// Créer une instance de la classe Jeux avec les paramètres récupérés
|
||||
Jeux jeux = new Jeux();
|
||||
|
||||
// Lancer l'activité Jeux avec les paramètres
|
||||
Intent intent = new Intent(this, Jeux.class);
|
||||
intent.putExtra("EXTRA_NOMBRE_QUESTIONS", nombreQuestions);
|
||||
intent.putExtra("EXTRA_AJOUT_GORGEE", ajoutGorgees);
|
||||
intent.putExtra("EXTRA_RATIO_OPENAI", ratioBddOpenAI);
|
||||
intent.putExtra("EXTRA_OPENAI", openAI);
|
||||
final EditText editText = findViewById(R.id.editTextGPT);
|
||||
intent.putExtra("EXTRA_KEY_OPENAI",editText.getText().toString() );
|
||||
|
||||
toutlesjoueurs = getIntent().getStringArrayListExtra("EXTRA_LIST_JOUEUR");
|
||||
intent.putStringArrayListExtra("EXTRA_LIST_JOUEUR", (ArrayList<String>) toutlesjoueurs);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,350 @@
|
||||
package com.example.boidelov3;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
|
||||
public class Jeuxold extends AppCompatActivity {
|
||||
private List<String> toutlesjoueurs, phraseGPT;
|
||||
private int nombreQuestions;
|
||||
private int ajoutGorgees;
|
||||
boolean openAI;
|
||||
int ratiOpenai;
|
||||
String keyOpenai, phraseGPTString;
|
||||
|
||||
|
||||
public Jeuxold() {
|
||||
//System.out.println("Je suis dans le constructeur jeux");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_jeux);
|
||||
//Recuperation des valeurs des activités précédentes
|
||||
toutlesjoueurs = getIntent().getStringArrayListExtra("EXTRA_LIST_JOUEUR");
|
||||
nombreQuestions = getIntent().getIntExtra("EXTRA_NOMBRE_QUESTIONS", 75);
|
||||
ajoutGorgees = getIntent().getIntExtra("EXTRA_AJOUT_GORGEE", 0);
|
||||
openAI = getIntent().getBooleanExtra("EXTRA_OPENAI", false);
|
||||
ratiOpenai = getIntent().getIntExtra("EXTRA_RATIO_OPENAI", 0);
|
||||
keyOpenai = getIntent().getStringExtra("EXTRA_KEY_OPENAI");
|
||||
|
||||
|
||||
|
||||
System.out.println("ACTJeux all player : " + toutlesjoueurs);
|
||||
System.out.println("ACTJeux nombre de questions : " + nombreQuestions);
|
||||
System.out.println("ACTJeux ajout de gorgées : " + ajoutGorgees);
|
||||
System.out.println("ACTJeux openAI : " + openAI);
|
||||
System.out.println("ACTJeux ratio openAI : " + ratiOpenai);
|
||||
System.out.println("ACTJeux key openAI : " + keyOpenai);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Parti OpenAI ; keyOpenai ; ratiOpenai, openAI
|
||||
//new DatabaseConnection().execute();
|
||||
|
||||
// if(openAI) {
|
||||
// ChatGPTTask chatGPTTask = new ChatGPTTask( this, keyOpenai);
|
||||
// chatGPTTask.execute();
|
||||
//
|
||||
// }
|
||||
|
||||
//Phrase avec nom ou pas?
|
||||
/* if(JoueurOuPas()){
|
||||
PhraseAvecNom(toutlesjoueurs);
|
||||
}else{
|
||||
PhraseSansNom();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
public void handleExtractedMessage(String phraseGPTString) {
|
||||
// Traitez la réponse extraite ici
|
||||
System.out.println(phraseGPTString);
|
||||
// Par exemple, affichez-la dans une TextView ou effectuez une action en fonction de la réponse
|
||||
}
|
||||
|
||||
public void navigateToJeuxParametres() {
|
||||
Intent intent = new Intent(Jeuxold.this, JeuxParametres.class);
|
||||
Toast.makeText(getApplicationContext(), "Échec de la communication avec l'API !", Toast.LENGTH_SHORT).show();
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
/*public void PhraseAvecNom(List toutlesjoueurs){
|
||||
//System.out.println("Je suis dans phrase avec pseudo");
|
||||
List<String> phraseAvecNom = new ArrayList<String>();
|
||||
List aleatoirejoueurs = TroisJoueurAleatoire(toutlesjoueurs);
|
||||
phraseAvecNom.add(ChoixJoueurAleatoire(toutlesjoueurs) + " dois boire " + Gorgeesaleatoire(2, 4)+ " Gorgées");
|
||||
phraseAvecNom.add(ChoixJoueurAleatoire((toutlesjoueurs))+ " est le vieux briscard ! Interdiction de montrer tes dents pendant 5 manches");
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0) + " et "+ aleatoirejoueurs.get(1) +" liser le premier SMS qui s'affiche quand on tape désolé dans la barre de recherche. Refusez pour 5 gorgées");
|
||||
phraseAvecNom.add( "A tour de role, vous avez exactement 3 secondes pour donner un mot en rapport avec le mots dit precedemment. Le joueur qui perd boit "+ Gorgeesaleatoire(2, 4) + " Gorgées! "+ aleatoirejoueurs.get(2)+" tu commences en choissisant un mot.");
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+ " defie "+ aleatoirejoueurs.get(1) + " au chifoumi ! Le joueur qui gagne distribue 5 Gorgées");
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+ " a toi de juger : entre "+aleatoirejoueurs.get(1)+ " et "+ aleatoirejoueurs.get(2) + " qui stresse le plus pour un rien selon toi? Cette personne se detendra en buvant " + Gorgeesaleatoire(3, 5 ) + " Gorgées");
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+" est dans le futur ! Tu dois parler au futur pendant 4 tours Une gorgées a chaque manque.");
|
||||
phraseAvecNom.add("Les joueurs de Counter Strike peuvent distribuer" + GorgeesaleatoireAmeliorer(1, 4));
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+" tu bois autant de gorgées que tu as d'années d'études après le BAC");
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+" et "+aleatoirejoueurs.get(1)+" ferment leurs yeux ! Ils/Elles doivent deviner la couleur des yeux de l'autre. Si ils/elles se trompent, c'est "+GorgeesaleatoireAmeliorer(2, 4));
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+" est manchot ! Il/Elle ne peut plus utiliser ses doigts durant 3 tours . Si il/elle s'en sert, il/elle devra boire autant de gorgées qu'il/elle a utilisé de doigts");
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+" et "+ aleatoirejoueurs.get(1)+" , si vous êtes ensemble dans la vraie vie, vous pouvez distribuer 2 gorgées , autrement buvez-les");
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+", donne le nombre d'habitant du Tadjikistant ( à 1 000 000 près) ou boit "+GorgeesaleatoireAmeliorer(2, 4));
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+" a la tourette ! A chaque fois que tu bois une gorgée, tu dois CRIER une insulte. C'est un stade avancé, ça dure 3 tours");
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+", donne la couleur préférée de "+aleatoirejoueurs.get(1)+" si tu te trompes, c'est 2 gorgées");
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+" à l'oeil de serpent pendant 5 tours ! Dès qu'un joueur te regarde dans les yeux, il/elle boit. Si personne ne t'as regardé tu bois"+GorgeesaleatoireAmeliorer(5, 9));
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+" et "+ aleatoirejoueurs.get(1)+"se mesurent ! Le plus petit peut bois"+GorgeesaleatoireAmeliorer(3, 5));
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+" doit terminer toutes ses phrases par - C'est clair pendant 7 tours");
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+" distribue"+GorgeesaleatoireAmeliorer(2,5)+" à la personne que tu trouves la mieux foutue");
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+" distribue"+GorgeesaleatoireAmeliorer(2,5)+" à qui tu veux.");
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+" et "+aleatoirejoueurs.get(1)+" se défient au 'je te tiens, tu me tiens', le premier qui rit sera une tapette, et devra boire"+GorgeesaleatoireAmeliorer(4,6));
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+" et "+aleatoirejoueurs.get(1)+"n'ont plus le droit d'utiliser leur téléphone jusqu'à la fin du jeu ! A chaque manque c'est"+GorgeesaleatoireAmeliorer(1,3));
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+" et "+aleatoirejoueurs.get(1)+ "racontent une anecdote, celui/celle qui sort la plus banale boit "+GorgeesaleatoireAmeliorer(3, 6));
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+", pour"+GorgeesaleatoireAmeliorer(2,4)+", a qui est ce slogan? Y a pas plus fort. (Vigor)");
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+", Vrai ou faux? L'eau est bleu car elle reflète le ciel? (Non) Si tu as repondu faux tu devras boire : "+GorgeesaleatoireAmeliorer(2,4));
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+", Si on te dit Marco? ... Si tu as dis Polo tu bois "+GorgeesaleatoireAmeliorer(1,3));
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+", Boire un café fait baisser le taux d'alcool? "+GorgeesaleatoireAmeliorer(5, 8)+"en jeu (FAUX)");
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+" est l'aigris pendant 5tours ! Dès que tu souris ou rigoles, tu bois "+GorgeesaleatoireAmeliorer(2,3));
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+" fait un geste, le suivant répète et en ajoute un. Le perdant boit"+GorgeesaleatoireAmeliorer(3,5));
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+", "+aleatoirejoueurs.get(2)+" et "+aleatoirejoueurs.get(1)+" vont désigner quelqu'un qui doit terminer son verre ");
|
||||
phraseAvecNom.add("Récitez l'alphabet en énonçant une lettre à tour de rôle. Si "+aleatoirejoueurs.get(0)+" finit son verre avant, cul sec pour tout le monde !");
|
||||
phraseAvecNom.add("Si"+aleatoirejoueurs.get(0)+" arrive a finir son verre en moins de 5 secondes, il/elle peut distribuer"+ GorgeesaleatoireAmeliorer(5, 8));
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+" et "+ aleatoirejoueurs.get(1)+"sont lies, si l'un boit alors l'autre aussi, et ce pendant 5 tours");
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+", "+aleatoirejoueurs.get(2)+" et "+ aleatoirejoueurs.get(1)+"sont lies, si l'un boit alors les autres aussi, et ce pendant 5 tours");
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+" dit un mot, la personne suivante le répète et en ajoute un nouveau, ainsi de suite jusqu'a ce que quelqu'un se trompe. Le perdant boit autant de gorgées qu'il y a eu de personne avant lui");
|
||||
phraseAvecNom.add(aleatoirejoueurs.get(0)+" doit choisir un mot que tout le monde devra dire à chaque fois qu'une personne boit.");
|
||||
//phraseAvecNom.add(aleatoirejoueurs.get(0)+"");
|
||||
//phraseAvecNom.add(aleatoirejoueurs.get(0)+"");
|
||||
//phraseAvecNom.add(aleatoirejoueurs.get(0)+"");
|
||||
//Affichage :
|
||||
TextView textView1 = (TextView) findViewById(R.id.textView1);
|
||||
textView1.setText(Nbaleatoirelist(phraseAvecNom));
|
||||
}
|
||||
public void PhraseSansNom(){
|
||||
//System.out.println("Je suis dans phrase sans pseudo");
|
||||
List<String> phraseSansNom = new ArrayList<String>();
|
||||
//Ajout de defis
|
||||
phraseSansNom.add("Tout le monde boit "+ Gorgeesaleatoire(1, 2)+" gorgée(s)");
|
||||
phraseSansNom.add("Quand l'heure affichera un multiple de 10 (22h, 22h10 ...) le premier a crier \"merde j'ai oublié mon chat\" distribura " + Gorgeesaleatoire(10, 12)+ " Gorgées");
|
||||
phraseSansNom.add("Ceux qui ont dansé aujourd'hui boivent 4 gorgées");
|
||||
phraseSansNom.add("Bois "+ Gorgeesaleatoire(2, 6)+ " Gorgées si tu n'as pas ton veritable nom sur insta");
|
||||
phraseSansNom.add("Bois "+ Gorgeesaleatoire(2, 3)+ " Gorgées si tu a des photos sur insta.");
|
||||
phraseSansNom.add("Plutôt ne plus avoir de mains ou de jambes? les perdants boivent "+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Celles/Ceux qui ont habité dans plus de 3 villes boivent "+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Vive la poésie ! Nos phrases doivent rimer sous peine d'une gorgée");
|
||||
phraseSansNom.add("Elisez le joueur le moins drôle d'entre vous, ce dernier boit" + GorgeesaleatoireAmeliorer(1,4 ));
|
||||
phraseSansNom.add("Elisez le joueur le plus drôle d'entre vous, ce dernier distribue" + GorgeesaleatoireAmeliorer(1,4 ));
|
||||
phraseSansNom.add("La dernière personne à avoir vomi en soirée distribue" + GorgeesaleatoireAmeliorer(2,4));
|
||||
phraseSansNom.add("Les filles peuvent distribuer"+ GorgeesaleatoireAmeliorer(1, 2));
|
||||
phraseSansNom.add("Les garçons peuvent distribuer"+ GorgeesaleatoireAmeliorer(1, 2));
|
||||
phraseSansNom.add("Toutes celles (ou ceux) qui ont du verni à ongles boivent"+GorgeesaleatoireAmeliorer(1,2));
|
||||
phraseSansNom.add("Tous les joueurs célibataires boivent"+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Tous ceux qui ont des lunettes boivent"+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Le premier joueur qui arrive à mettre son doigt dans le nez d'un autre joueur peut distribuer"+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Tous ceux qui ont déjà triché à un examen boivent "+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Plutôt avoir un tapis volant, ou un frigo qui se remplit tout seul ? Votez tous en même temps. La minorité boit "+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Les couples trinquer ensemble "+ GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Le/La plus radin(e) boit"+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Le mec qui a le plus gros ventre à bière boit"+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Tous ceux qui se sont déjà fait exclure de cours boivent"+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Tous ceux qui ont des frères et soeurs boivent"+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Celles et ceux qui ont un Windows phone peuvent distribuer"+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Celles/Ceux qui se sont déjà battus boivent"+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Celui/Celle qui pèse le plus lourd boit "+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Pour se décoincer, le/la plus timide boit"+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Le/La plus jeune boit"+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Plutôt avoir du temps ou de l'argent ? Votez tous en même temps. La minorité boit"+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Celles/Ceux qui ont fait des études de L boivent"+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Le premier joueur qui en embrasse un autre sur la bouche pourra distribuer"+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Celles et ceux qui joue de la guitare peuvent distribuer"+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Celles et ceux qui joue du piano peuvent distribuer"+GorgeesaleatoireAmeliorer(1,4));
|
||||
phraseSansNom.add("Les gens qui se sont masturbés aujourd'hui peuvent distribuer"+GorgeesaleatoireAmeliorer(1, 4));
|
||||
phraseSansNom.add("Celui ou celle a la meilleure place boit"+GorgeesaleatoireAmeliorer(1, 4));
|
||||
phraseSansNom.add("Celles et ceux qui n'ont jamais trompé leur partenaire (c'est bien) peuvent distribuer"+GorgeesaleatoireAmeliorer(1, 4));
|
||||
phraseSansNom.add("Celui/Celle avec les vêtements les plus moches boit"+GorgeesaleatoireAmeliorer(1, 4));
|
||||
phraseSansNom.add("Celui/Celle qui a les cheveux les plus longs boit"+GorgeesaleatoireAmeliorer(1, 4));
|
||||
phraseSansNom.add("On doit doser son Alcool les yeux fermés"+GorgeesaleatoireAmeliorer(1, 4));
|
||||
phraseSansNom.add("Plutôt série ou film ? Votez tous en même temps. La minorité boit"+GorgeesaleatoireAmeliorer(1, 4));
|
||||
phraseSansNom.add("Elisez le plus débile d'entre vous, ce dernier boit"+GorgeesaleatoireAmeliorer(1, 4));
|
||||
phraseSansNom.add("Le premier qui donne un film de - Christopher Nolan - pourra distribuer"+GorgeesaleatoireAmeliorer(1, 4));
|
||||
phraseSansNom.add("Le premier qui donne un film avec Christian Clavier pourra boire"+GorgeesaleatoireAmeliorer(1, 4));
|
||||
phraseSansNom.add("Les végans boivent "+GorgeesaleatoireAmeliorer(1, 4));
|
||||
phraseSansNom.add("La fille la plus maquillé boit"+GorgeesaleatoireAmeliorer(1, 4));
|
||||
phraseSansNom.add("Celles/Ceux qui ont déjà appelé leur partenaire par le prénom de leurs ex boivent"+GorgeesaleatoireAmeliorer(1, 4));
|
||||
phraseSansNom.add("La première personne qui désigne le plus jeune peut distribuer"+GorgeesaleatoireAmeliorer(1, 4));
|
||||
phraseSansNom.add("Plutôt avoir des connaissances illimitées ou dirigier le monde ? Votez tous en même temps. La minorité boit"+GorgeesaleatoireAmeliorer(1, 4));
|
||||
phraseSansNom.add("Plutôt n'avoir aucun ami ou ne plus pouvoir utiliser d'appareil électronique ? Votez tous en même temps. La minorité boit"+ GorgeesaleatoireAmeliorer(2, 5));
|
||||
phraseSansNom.add("Plutot vaincre le patrikaka ou la polution dans le monde? Votez tous en meme temps. La minorité boit"+GorgeesaleatoireAmeliorer(1, 2));
|
||||
phraseSansNom.add("Jeu du LUTIN : Jusqu'a la fin du jeu. Vous devez enlever le lutin de votre verre pour pouvoir boire et le remettre ensuite sinon vous devait reboire");
|
||||
phraseSansNom.add("Celles et ceux qui boivent de la Vodka peuvent distribuer "+ GorgeesaleatoireAmeliorer(2, 4));
|
||||
phraseSansNom.add("Les joueurs qui ont un A dans leur prénom boivent "+GorgeesaleatoireAmeliorer(3,5));
|
||||
phraseSansNom.add("Les joueurs qui ont un P dans le prénom distribue"+GorgeesaleatoireAmeliorer(1, 3));
|
||||
phraseSansNom.add("Le premier joueur à ramener un objet rouge (pas de vêtements) peut distribuer"+GorgeesaleatoireAmeliorer(3,5));
|
||||
phraseSansNom.add("Le premier joueur qui dévoile un de ses secrets et que personne autour ne sait peut distribuer"+ GorgeesaleatoireAmeliorer(3, 6));
|
||||
phraseSansNom.add("Chaque joueur doit lire à haute voix le dernier SMS qu'il a reçu. Si il/elle refuse, c'est"+ GorgeesaleatoireAmeliorer(2, 4));
|
||||
phraseSansNom.add("Le joueur avec le plus gros cul boit"+ GorgeesaleatoireAmeliorer(2, 6));
|
||||
phraseSansNom.add("Celles/Ceux qui ont moins de 20ans boivent"+ GorgeesaleatoireAmeliorer(2, 7));
|
||||
phraseSansNom.add("Celui ou celle avec le plus gros appetit sexuel boit"+ GorgeesaleatoireAmeliorer(2, 4));
|
||||
phraseSansNom.add("Ceux/Celles qui fumes boivent "+ GorgeesaleatoireAmeliorer(2, 4));
|
||||
phraseSansNom.add("Celles et ceux qui ont au moins un BAC +3 peuvent distribuer"+ GorgeesaleatoireAmeliorer(2, 4));
|
||||
phraseSansNom.add("Le premier joueur à se lever peut donner"+ GorgeesaleatoireAmeliorer(6, 7));
|
||||
phraseSansNom.add("Celles et ceux qui n'ont jamais fait de strip tease boivent"+ GorgeesaleatoireAmeliorer(2, 4));
|
||||
phraseSansNom.add("Le premier joueur à enlever un vêtements pourra distribuer"+ GorgeesaleatoireAmeliorer(5, 7));
|
||||
phraseSansNom.add("Jeu des peaux ! Triez vous du joueur le plus bronzé au joueur le moins bronzé. Le plus bronzé prend 1 gorgée, le second 2 gorgées, etc.");
|
||||
phraseSansNom.add("Tous ceux qui ont déjà uriné dans une piscine boivent"+ GorgeesaleatoireAmeliorer(2, 4));
|
||||
phraseSansNom.add("Celui/Celle avec le plus d'amis sur Facebook boit"+ GorgeesaleatoireAmeliorer(2, 4));
|
||||
phraseSansNom.add("Celui/Celle avec le nom de famille le plus compliqué boit"+ GorgeesaleatoireAmeliorer(2, 4));
|
||||
phraseSansNom.add("Les joueurs qui n'ont pas encore distribué de gorgées boivent"+ GorgeesaleatoireAmeliorer(2, 4));
|
||||
phraseSansNom.add("Plutôt avoir du pouvoir ou de la connaissance ? Votez tous en même temps. La minorité boit"+ GorgeesaleatoireAmeliorer(2, 4));
|
||||
phraseSansNom.add("le plus gros dalleux avec les filles boit"+ GorgeesaleatoireAmeliorer(2, 4));
|
||||
phraseSansNom.add("Le premier joueur à donner l'heure pourra distribuer"+ GorgeesaleatoireAmeliorer(2, 4));
|
||||
phraseSansNom.add("Celles et ceux qui ont déjà dépenser plus de 2000 euros en un achat peuvent distribuer"+ GorgeesaleatoireAmeliorer(2, 4));
|
||||
phraseSansNom.add("Le mec le moins courageux boit "+ GorgeesaleatoireAmeliorer(2, 4));
|
||||
phraseSansNom.add("Celles/Ceux qui rentre chez eux à la fin de la soirée boivent"+ GorgeesaleatoireAmeliorer(8, 12));
|
||||
phraseSansNom.add("Il est désormais interdit de se tutoyer");
|
||||
phraseSansNom.add("Toutes les règles existantes sont annulées");
|
||||
phraseSansNom.add("Celles et ceux dont le jour d'anniversaire est un nombre impair boivent"+ GorgeesaleatoireAmeliorer(2, 4));
|
||||
//phraseSansNom.add("");
|
||||
//phraseSansNom.add("");
|
||||
//phraseSansNom.add("");
|
||||
//phraseSansNom.add("");
|
||||
//phraseSansNom.add("");
|
||||
//phraseSansNom.add("");
|
||||
//phraseSansNom.add("");
|
||||
//phraseSansNom.add("");
|
||||
//phraseSansNom.add("");*/
|
||||
|
||||
|
||||
//
|
||||
|
||||
//Affichage :
|
||||
TextView textView1 = (TextView) findViewById(R.id.textView1);
|
||||
//textView1.setText(Nbaleatoirelist(phraseSansNom));
|
||||
//}
|
||||
|
||||
public int Gorgeesaleatoire(int Min, int Max){
|
||||
int offset = ajoutGorgees;
|
||||
int nbgorgées;
|
||||
Random rand = new Random();
|
||||
if (Min == 1 && Max == 2){
|
||||
nbgorgées = rand.nextInt(Max + Min);
|
||||
}else {
|
||||
nbgorgées = Min+rand.nextInt(Max - Min);
|
||||
}
|
||||
if(nbgorgées == 0){
|
||||
nbgorgées = 1;
|
||||
}
|
||||
nbgorgées = nbgorgées + offset;
|
||||
return nbgorgées;
|
||||
}
|
||||
public String GorgeesaleatoireAmeliorer(int Min, int Max){
|
||||
int offset = ajoutGorgees;
|
||||
int nbgorgées;
|
||||
Random rand = new Random();
|
||||
if (Min == 1 && Max == 2){
|
||||
nbgorgées = rand.nextInt(Max + Min);
|
||||
}else {
|
||||
nbgorgées = Min+rand.nextInt(Max - Min);
|
||||
}
|
||||
if(nbgorgées == 0){
|
||||
nbgorgées = 1;
|
||||
}
|
||||
nbgorgées = nbgorgées + offset;
|
||||
String debut;
|
||||
|
||||
String nbgorgéesstr;
|
||||
String nbgorgéesstr1;
|
||||
debut = " ";
|
||||
nbgorgéesstr1 = " Gorgée(s)";
|
||||
nbgorgéesstr = debut + Integer.toString(nbgorgées) + nbgorgéesstr1;
|
||||
return nbgorgéesstr;
|
||||
}
|
||||
|
||||
public String Nbaleatoirelist(List list){
|
||||
Random rand = new Random();
|
||||
String phrase = (String) list.get(rand.nextInt(list.size()));
|
||||
return phrase;
|
||||
}
|
||||
public int Nbaleatoire(){
|
||||
int Max = 100;
|
||||
int Min = 0;
|
||||
Random rand = new Random();
|
||||
int nbaleatoire = rand.nextInt(Max - Min);
|
||||
return nbaleatoire;
|
||||
}
|
||||
public boolean JoueurOuPas(){
|
||||
boolean TrueFalse;
|
||||
int nbaleatoire = Nbaleatoire();
|
||||
int pourcentage = 40;
|
||||
//System.out.println(nbaleatoire);
|
||||
if(nbaleatoire >= pourcentage){
|
||||
TrueFalse = false;}
|
||||
else{
|
||||
TrueFalse = true;
|
||||
}
|
||||
//System.out.println(TrueFalse);
|
||||
return TrueFalse;
|
||||
}
|
||||
public List TroisJoueurAleatoire(List toutlesjoueurs){
|
||||
List<String> listJoueur = new ArrayList<String>();
|
||||
while (true){
|
||||
Random rand = new Random();
|
||||
String joueur1 = (String) toutlesjoueurs.get(rand.nextInt(toutlesjoueurs.size()));
|
||||
String joueur2 = (String) toutlesjoueurs.get(rand.nextInt(toutlesjoueurs.size()));
|
||||
String joueur3 = (String) toutlesjoueurs.get(rand.nextInt(toutlesjoueurs.size()));
|
||||
if(joueur1 == joueur2 ){
|
||||
}else{
|
||||
if (joueur1 == joueur3){
|
||||
}else {
|
||||
if (joueur2 == joueur3) {
|
||||
}else{
|
||||
listJoueur.add(joueur1);
|
||||
listJoueur.add(joueur2);
|
||||
listJoueur.add(joueur3);
|
||||
return listJoueur;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String ChoixJoueurAleatoire( List toutlesjoueurs){
|
||||
//System.out.println(inttoutlesjoueurs);
|
||||
Random rand = new Random();
|
||||
String joueur = (String) toutlesjoueurs.get(rand.nextInt(toutlesjoueurs.size()));
|
||||
//System.out.println(joueur);
|
||||
//int nbaleatoire = rand.nextInt(max -min + 1 ) + min;
|
||||
//int nbaleatoire2 = nbaleatoire - 1;
|
||||
//if(nbaleatoire2 == -1 ){
|
||||
// nbaleatoire2 = 0;
|
||||
//}
|
||||
//System.out.println( "nb aleatoire " + nbaleatoire) ;
|
||||
//joueur = (String) toutlesjoueurs.get(nbaleatoire2);
|
||||
//System.out.println(joueur);
|
||||
return joueur ;
|
||||
|
||||
}
|
||||
public void OnClickButton1(View v){
|
||||
finish();
|
||||
startActivity(getIntent());
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
// Votre code pour gérer les modifications d'orientation ici
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,193 @@
|
||||
package com.example.boidelov3;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.text.InputType;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
//public static final List EXTRA_LIST_JOUEUR = Collections.singletonList("com.example.piccolov2.jeux.EXTRA_LISTJOUEUR");
|
||||
|
||||
String J1S,J2S,J3S;
|
||||
private int offset;
|
||||
private List<String> toutlesjoueurs;
|
||||
private List<String> PhraseSansNom;
|
||||
EditText J1;
|
||||
EditText J2;
|
||||
EditText J3;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
}
|
||||
private List<EditText> editTextList = new ArrayList<>();
|
||||
public void onClickButton1(View view) {
|
||||
LinearLayout namesContainer = findViewById(R.id.namesContainer); // Récupère le conteneur des noms
|
||||
|
||||
EditText newEditText = new EditText(this); // Crée un nouvel EditText
|
||||
newEditText.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)); // Définit les paramètres de mise en page
|
||||
newEditText.setHint("Nom"); // Définit le texte d'indication
|
||||
newEditText.setInputType(InputType.TYPE_TEXT_FLAG_CAP_WORDS); // Définit le type d'entrée (texte avec majuscule au début des mots)
|
||||
editTextList.add(newEditText); // Ajoute l'EditText à la liste des EditText
|
||||
namesContainer.addView(newEditText); // Ajoute le nouvel EditText au conteneur des noms
|
||||
}
|
||||
|
||||
|
||||
public void onClickButtonStart(View view) {
|
||||
J1 = (EditText) findViewById(R.id.J1);
|
||||
J1S = J1.getText().toString();
|
||||
|
||||
J2 = (EditText) findViewById(R.id.J2);
|
||||
J2S = J2.getText().toString();
|
||||
|
||||
J3 = (EditText) findViewById(R.id.J3);
|
||||
J3S = J3.getText().toString();
|
||||
|
||||
|
||||
|
||||
//Creation d'une liste avec tt les j et verif si elle est completé
|
||||
toutlesjoueurs = new ArrayList<String>();
|
||||
if (J1S.isEmpty()) {
|
||||
//System.out.println("J1S A pas de valeur");
|
||||
}else toutlesjoueurs.add(J1S);
|
||||
if (J2S.isEmpty()) {
|
||||
//System.out.println("J2S a pas de valeur");
|
||||
}else toutlesjoueurs.add(J2S);
|
||||
if (J3S.isEmpty()) {
|
||||
//System.out.println("J3S a pas de valeur");
|
||||
}else toutlesjoueurs.add(J3S);
|
||||
|
||||
//
|
||||
int nbnom = editTextList.size();
|
||||
//String test = editTextList.get(0).getText().toString();
|
||||
//System.out.println(test);
|
||||
System.out.println(nbnom);
|
||||
for (int i = 0; i < nbnom; i++) {
|
||||
String nom = editTextList.get(i).getText().toString();
|
||||
System.out.println(nom);
|
||||
if (nom.isEmpty()) {
|
||||
System.out.println("Nom vide");
|
||||
} else {
|
||||
toutlesjoueurs.add(nom);
|
||||
}
|
||||
}
|
||||
//TestListe
|
||||
//System.out.println(toutlesjoueurs);
|
||||
|
||||
openParametres();
|
||||
}
|
||||
public void openParametres(){
|
||||
//enregistrement des joueurs dans les shared preferences Joueurs
|
||||
SharedPreferences sharedPreferences = getSharedPreferences("Joueurs", Context.MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = sharedPreferences.edit();
|
||||
|
||||
editor.putString("J1", J1S);
|
||||
editor.putString("J2", J2S);
|
||||
editor.putString("J3", J3S);
|
||||
|
||||
for (int i = 0; i < editTextList.size(); i++) {
|
||||
String nom = editTextList.get(i).getText().toString();
|
||||
editor.putString("J" + (i + 4), nom);
|
||||
}
|
||||
|
||||
editor.apply();
|
||||
//Lancement de l'activité (Jeux_parametres)
|
||||
|
||||
Intent intent = new Intent(this, JeuxParametres.class);
|
||||
//Regarde si le pseudo est vide et envoie a l'activité jeux
|
||||
if (toutlesjoueurs.isEmpty()){
|
||||
Context context = getApplicationContext();
|
||||
CharSequence text = "Merci de rentrer des joueurs";
|
||||
int duration = Toast.LENGTH_SHORT;
|
||||
|
||||
Toast toast = Toast.makeText(context, text, duration);
|
||||
toast.show();
|
||||
}
|
||||
else {
|
||||
if (toutlesjoueurs.size() >= 3) {
|
||||
intent.putStringArrayListExtra("EXTRA_LIST_JOUEUR", (ArrayList<String>) toutlesjoueurs);
|
||||
//intent.putStringArrayListExtra("EXTRA_LIST_DEFI_NON_JOUEUR", (ArrayList<String>) PhraseSansNom);
|
||||
intent.putExtra("EXTRA_OFFSET", offset);
|
||||
startActivity(intent);
|
||||
} else {
|
||||
Context context = getApplicationContext();
|
||||
CharSequence text = "La partie ne peux pas commencer avec moins de 3 joueurs";
|
||||
int duration = Toast.LENGTH_SHORT;
|
||||
Toast toast = Toast.makeText(context, text, duration);
|
||||
toast.show();
|
||||
|
||||
}
|
||||
}}}
|
||||
//Lancement de la fonction activité (Jeux)
|
||||
// openJeux();
|
||||
// }
|
||||
|
||||
//Lancement de l'activité (Jeux)
|
||||
// public void openJeux(){
|
||||
//
|
||||
// Intent intent = new Intent(this, Jeux.class);
|
||||
// //Regarde si le pseudo est vide et envoie a l'activité jeux
|
||||
// if (toutlesjoueurs.isEmpty()){
|
||||
// Context context = getApplicationContext();
|
||||
// CharSequence text = "Merci de rentrer des joueurs";
|
||||
// int duration = Toast.LENGTH_SHORT;
|
||||
//
|
||||
// Toast toast = Toast.makeText(context, text, duration);
|
||||
// toast.show();
|
||||
// }
|
||||
// else{
|
||||
// if(toutlesjoueurs.size() >= 3){
|
||||
// intent.putStringArrayListExtra("EXTRA_LIST_JOUEUR", (ArrayList<String>) toutlesjoueurs);
|
||||
// //intent.putStringArrayListExtra("EXTRA_LIST_DEFI_NON_JOUEUR", (ArrayList<String>) PhraseSansNom);
|
||||
// intent.putExtra("EXTRA_OFFSET", offset);
|
||||
// startActivity(intent);
|
||||
// }else{
|
||||
// Context context = getApplicationContext();
|
||||
// CharSequence text = "La partie ne peux pas commencer avec moins de 3 joueurs";
|
||||
// int duration = Toast.LENGTH_SHORT;
|
||||
// Toast toast = Toast.makeText(context, text, duration);
|
||||
// toast.show();
|
||||
//
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// public void OnCheckboxClicked1(View view) {
|
||||
// boolean checked = ((CheckBox) view).isChecked();
|
||||
// if (checked){
|
||||
// offset = 2;
|
||||
// //System.out.println("OFFSET DE 2");
|
||||
// }else {
|
||||
// //System.out.println("DESACTIVER : OFFSET DE 2");
|
||||
// offset = 0;
|
||||
// }}
|
||||
//
|
||||
// public void OnCheckboxClicked2(View view) {
|
||||
// boolean checked = ((CheckBox) view).isChecked();
|
||||
// if (checked){
|
||||
// offset = 4;
|
||||
// //System.out.println("OFFSET DE 4");
|
||||
// }else {
|
||||
// //System.out.println("DESACTIVER : OFFSET DE 4");
|
||||
// offset = 0;
|
||||
// }}
|
||||
//}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.example.boidelov3;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Question {
|
||||
private int id;
|
||||
private String question;
|
||||
private int gorger;
|
||||
private boolean distribution;
|
||||
private List<String> variante;
|
||||
private boolean recois;
|
||||
private boolean manches;
|
||||
private String arret; // mise à jour du type de données
|
||||
private int manchesRestantes; // pour le nombre de manches restantes
|
||||
private String arretMessage; // pour le message d'arrêt
|
||||
private String arretMessageManche; // pour le message d'arrêt pour les manches
|
||||
|
||||
// Constructeur par défaut
|
||||
public Question() {
|
||||
}
|
||||
|
||||
// Getters et setters pour tous les champs
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getQuestion() {
|
||||
return question;
|
||||
}
|
||||
|
||||
public void setQuestion(String question) {
|
||||
this.question = question;
|
||||
}
|
||||
|
||||
public int getGorger() {
|
||||
return gorger;
|
||||
}
|
||||
|
||||
public void setGorger(int gorger) {
|
||||
this.gorger = gorger;
|
||||
}
|
||||
|
||||
public boolean isDistribution() {
|
||||
return distribution;
|
||||
}
|
||||
|
||||
public void setDistribution(boolean distribution) {
|
||||
this.distribution = distribution;
|
||||
}
|
||||
|
||||
public List<String> getVariante() {
|
||||
return variante;
|
||||
}
|
||||
|
||||
public void setVariante(List<String> variante) {
|
||||
this.variante = variante;
|
||||
}
|
||||
|
||||
public boolean isRecois() {
|
||||
return recois;
|
||||
}
|
||||
|
||||
public void setRecois(boolean recois) {
|
||||
this.recois = recois;
|
||||
}
|
||||
|
||||
public boolean isManches() {
|
||||
return manches;
|
||||
}
|
||||
|
||||
public void setManches(boolean manches) {
|
||||
this.manches = manches;
|
||||
}
|
||||
|
||||
public String getArret() {
|
||||
return arret;
|
||||
}
|
||||
|
||||
public void setArret(String arret) {
|
||||
this.arret = arret;
|
||||
}
|
||||
|
||||
public int getManchesRestantes() {
|
||||
return manchesRestantes;
|
||||
}
|
||||
|
||||
public void setManchesRestantes(int manchesRestantes) {
|
||||
this.manchesRestantes = manchesRestantes;
|
||||
}
|
||||
|
||||
public String getArretMessage() {
|
||||
return arretMessage;
|
||||
}
|
||||
|
||||
public void setArretMessage(String arretMessage) {
|
||||
this.arretMessage = arretMessage;
|
||||
}
|
||||
public String getArretMessageManche() {
|
||||
return arretMessageManche;
|
||||
}
|
||||
|
||||
public void setArretMessageManche(String arretMessageManche) {
|
||||
this.arretMessageManche = arretMessageManche;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.example.boidelov3;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Questions {
|
||||
private String version;
|
||||
private List<Question> questions;
|
||||
|
||||
// Getters et setters pour chaque champ
|
||||
public List<Question> getQuestions() {
|
||||
return questions;
|
||||
}
|
||||
|
||||
// autres getters et setters...
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<objectAnimator
|
||||
android:propertyName="backgroundColor"
|
||||
android:valueFrom="#00000000"
|
||||
android:valueTo="#FFFF0000"
|
||||
android:duration="1000" />
|
||||
</set>
|
||||
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#3DDC84"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
||||
@@ -0,0 +1,30 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:foregroundGravity="center|center_horizontal"
|
||||
tools:context=".Jeux">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:autoText="true"
|
||||
android:gravity="center"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||
android:textSize="30sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.35000002" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button"
|
||||
android:layout_width="151dp"
|
||||
android:layout_height="88dp"
|
||||
android:bufferType="normal"
|
||||
android:onClick="OnClickButton1"
|
||||
android:text="Suivant"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.81" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,191 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="false"
|
||||
android:layout_alignParentTop="false"
|
||||
android:layout_alignParentRight="false"
|
||||
android:layout_alignParentBottom="false"
|
||||
tools:context=".MainActivity"
|
||||
android:layout_alignParentStart="false"
|
||||
android:layout_alignParentEnd="false">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/Titre"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/param_tres_du_jeu"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="30sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/toolbar"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/PremsLinearV"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="476dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/toolbar"
|
||||
app:layout_constraintVertical_bias="0.100000024"
|
||||
tools:visibility="visible">
|
||||
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:padding="3dp"
|
||||
android:scrollbarSize="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Nombre de questions avant la fin de partie : 50"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekBar1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Ajout de gorgées : 0 "
|
||||
android:textAlignment="textStart"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekBar2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Palier : Grosse merde"
|
||||
android:textAlignment="center"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="51dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="271dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/openai"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkBoxGPT"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/activer_les_questions_par_chatgpt" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextGPT"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="false"
|
||||
android:hint="@string/cl_api_openai" />
|
||||
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewRatioGen"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="false"
|
||||
android:text="Le ratio du nombre de questions générées par l'IA."
|
||||
android:textSize="16sp" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekBar3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="false" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/ButtonTestApi"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:enabled="false"
|
||||
android:onClick="onClickButtonTestAPI"
|
||||
android:text="@string/test_de_connectivit_openai" />
|
||||
|
||||
<Space
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/Go2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:onClick="onClickButtonStart"
|
||||
android:text="@string/commencer_a_vous_mettre_une_mine"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:srcCompat="@android:drawable/ic_menu_slideshow" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="false"
|
||||
android:layout_alignParentTop="false"
|
||||
android:layout_alignParentRight="false"
|
||||
android:layout_alignParentBottom="false"
|
||||
tools:context=".MainActivity"
|
||||
android:layout_alignParentStart="false"
|
||||
android:layout_alignParentEnd="false">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/PremsLinearV"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.52"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/Titre"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="8dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/bienvenue"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="30sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="7"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/namesContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/laisse_vide_si_il_y_a_pas_assez_de_joueur"
|
||||
android:textAlignment="center"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible" />
|
||||
<EditText
|
||||
android:id="@+id/J1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:autofillHints=""
|
||||
android:ems="10"
|
||||
android:hint="@string/nom"
|
||||
android:inputType="textPersonName"
|
||||
android:singleLine="true" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/J2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:autofillHints=""
|
||||
android:ems="10"
|
||||
android:hint="@string/nom"
|
||||
android:inputType="textPersonName" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/J3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:autofillHints=""
|
||||
android:ems="10"
|
||||
android:hint="@string/nom"
|
||||
android:inputType="textPersonName" />
|
||||
<LinearLayout
|
||||
android:id="@+id/nameEntryLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/Validation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:onClick="onClickButton1"
|
||||
android:text="@string/c_ok"
|
||||
android:textColor="#009688" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/Go"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="@string/go"
|
||||
android:visibility="visible"
|
||||
android:onClick="onClickButtonStart"
|
||||
tools:srcCompat="@android:drawable/ic_menu_slideshow" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 982 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
@@ -0,0 +1,7 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Base.Theme.BoideloV3" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Customize your dark theme here. -->
|
||||
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
|
||||
</style>
|
||||
</resources>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
</resources>
|
||||
@@ -0,0 +1,24 @@
|
||||
<resources>
|
||||
<string name="app_name">Boidelo</string>
|
||||
<string name="j10">J10</string>
|
||||
<string name="pseudo">Pseudo</string>
|
||||
<string name="nom">Nom</string>
|
||||
<string name="c_ki">c ki</string>
|
||||
<string name="komment_il_s_appel">komment il s\'appel</string>
|
||||
<string name="who">who</string>
|
||||
<string name="joueur">Joueur</string>
|
||||
<string name="prenom">Prenom</string>
|
||||
<string name="c_ok">Ajouter une nouvelle personne</string>
|
||||
<string name="laisse_vide_si_il_y_a_pas_assez_de_joueur">Pour commencer le jeu, il suffit d\'abord de rentrer le noms des joueurs</string>
|
||||
<string name="joueurTITRE">Joueur :</string>
|
||||
<string name="bienvenue">Bienvenue sur Boidelo </string>
|
||||
<string name="eclatax_4_gorg_es">Eclatax (+4 Gorgées)</string>
|
||||
<string name="habitu_s_2_gorg_es">Habitués (+2 Gorgées)</string>
|
||||
<string name="go">"Suivant !"</string>
|
||||
<string name="param_tres_du_jeu">Paramètres du jeu</string>
|
||||
<string name="commencer_a_vous_mettre_une_mine">Commencer a vous mettre une mine !</string>
|
||||
<string name="activer_les_questions_par_chatgpt">Activer les questions par ChatGPT</string>
|
||||
<string name="cl_api_openai">Clé API OpenAI</string>
|
||||
<string name="openai">OpenAI [En cours de développement]</string>
|
||||
<string name="test_de_connectivit_openai">Test de Connectivité Openai</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,9 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Base.Theme.BoideloV3" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Customize your light theme here. -->
|
||||
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
|
||||
</style>
|
||||
|
||||
<style name="Theme.BoideloV3" parent="Base.Theme.BoideloV3" />
|
||||
</resources>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample backup rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/guide/topics/data/autobackup
|
||||
for details.
|
||||
Note: This file is ignored for devices older that API 31
|
||||
See https://developer.android.com/about/versions/12/backup-restore
|
||||
-->
|
||||
<full-backup-content>
|
||||
<!--
|
||||
<include domain="sharedpref" path="."/>
|
||||
<exclude domain="sharedpref" path="device.xml"/>
|
||||
-->
|
||||
</full-backup-content>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<selector>
|
||||
<item android:duration="1000">
|
||||
<shape>
|
||||
<gradient
|
||||
android:startColor="#00000000"
|
||||
android:endColor="#FFFF0000"
|
||||
android:type="linear" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
|
||||
</PreferenceScreen>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample data extraction rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
|
||||
for details.
|
||||
-->
|
||||
<data-extraction-rules>
|
||||
<cloud-backup>
|
||||
<!-- TODO: Use <include> and <exclude> to control what is backed up.
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
-->
|
||||
</cloud-backup>
|
||||
<!--
|
||||
<device-transfer>
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
</device-transfer>
|
||||
-->
|
||||
</data-extraction-rules>
|
||||
@@ -0,0 +1,5 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
id 'com.android.application' version '8.2.0' apply false
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# Project-wide Gradle settings.
|
||||
# IDE (e.g. Android Studio) users:
|
||||
# Gradle settings configured through the IDE *will override*
|
||||
# any settings specified in this file.
|
||||
# For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||
# Android operating system, and which are packaged with your app's APK
|
||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||
android.useAndroidX=true
|
||||
# Enables namespacing of each library's R class so that its R class includes only the
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
||||
@@ -0,0 +1,6 @@
|
||||
#Sat Aug 05 20:48:25 CEST 2023
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -0,0 +1,185 @@
|
||||
#!/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
|
||||
;;
|
||||
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" "$@"
|
||||
@@ -0,0 +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
|
||||
@@ -0,0 +1,17 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "BoideloV3"
|
||||
include ':app'
|
||||