From 18694b9ab666340ec65228379fa6f84707e614fa Mon Sep 17 00:00:00 2001 From: Thomas Chazot Date: Fri, 24 Nov 2023 11:03:12 +0100 Subject: [PATCH 1/5] fin du jeu manque plus que l'affichage --- .../src/Components/GraphContainer.tsx | 23 +++++- cryptide_project/src/Contexts/GameContext.tsx | 10 ++- cryptide_project/src/Pages/Play.tsx | 9 +++ cryptide_project/src/Translations/fr.json | 2 +- .../src/model/EnigmeDuJourCreator.ts | 74 +++++++++++++++++++ cryptide_project/src/model/Stub.ts | 10 +-- cryptide_project/src/res/names.json | 4 - 7 files changed, 117 insertions(+), 15 deletions(-) create mode 100644 cryptide_project/src/model/EnigmeDuJourCreator.ts diff --git a/cryptide_project/src/Components/GraphContainer.tsx b/cryptide_project/src/Components/GraphContainer.tsx index 5399b83..a124dc7 100644 --- a/cryptide_project/src/Components/GraphContainer.tsx +++ b/cryptide_project/src/Components/GraphContainer.tsx @@ -39,13 +39,14 @@ let lastSocketId= "" let firstLap = true let cptHistory = 0 let lastNodes: NodePerson[] = [] +let firstEnigme = true const MyGraphComponent: React.FC = ({onNodeClick, handleShowTurnBar, handleTurnBarTextChange, playerTouched, setPlayerTouched, changecptTour, solo, addToHistory, showLast, setNetwork}) => { let cptTour: number = 0 const {user} = useAuth() - const { indices, indice, person, personNetwork, setNodeIdData, players, askedPersons, setActualPlayerIndexData, room, actualPlayerIndex, turnPlayerIndex, setTurnPlayerIndexData, setWinnerData } = useGame(); + const { indices, indice, person, personNetwork, setNodeIdData, players, askedPersons, setActualPlayerIndexData, room, actualPlayerIndex, turnPlayerIndex, setTurnPlayerIndexData, setWinnerData, dailyEnigme } = useGame(); const params = new URLSearchParams(window.location.search); const navigate = useNavigate(); @@ -258,6 +259,26 @@ let cptTour: number = 0 setNetwork(network) + dailyEnigme.forEach((pairs, index) => { + pairs.forEach((pair) => { + const i = indices.findIndex((indice) => pair.first.getId() === indice.getId()) + console.log(index) + const node = networkData.nodes.get().find((n) => index == n.id) + if (node != undefined){ + networkData.nodes.update({id: node.id, label: node.label + positionToEmoji(i, pair.second)}) + const test = networkData.nodes.get().find((n) => index == n.id) + if (test!=undefined){ + console.log(test.label) + } + } + }) + }); + + indices.forEach((i, index) => { + console.log(i.ToString("fr") + " => " + positionToEmoji(index, true)) + }) + + if (!solo){ socket.on("asked all", (id) =>{ const pers = personNetwork.getPersons().find((p) => p.getId() == id) diff --git a/cryptide_project/src/Contexts/GameContext.tsx b/cryptide_project/src/Contexts/GameContext.tsx index 32da9d2..ecc142d 100644 --- a/cryptide_project/src/Contexts/GameContext.tsx +++ b/cryptide_project/src/Contexts/GameContext.tsx @@ -1,5 +1,6 @@ import React, { createContext, useContext, useState, ReactNode } from 'react'; import Indice from '../model/Indices/Indice'; +import Pair from '../model/Pair'; import Person from '../model/Person'; import PersonNetwork from '../model/PersonsNetwork'; import Player from '../model/Player'; @@ -17,6 +18,7 @@ interface GameContextProps { room: string; onlyFalse: boolean winner: Player | null + dailyEnigme: Map[]> setIndicesData: (newIndices: Indice[]) => void; setIndiceData: (newIndice: Indice) => void; setPersonData: (newPerson: Person) => void; @@ -30,6 +32,7 @@ interface GameContextProps { setOnlyFalseData: (newOnlyFalse: boolean) => void setWinnerData: (winner: Player) => void reset: () => void + setDailyEnigmeData: (map: Map[]>) => void } const GameContext = createContext(undefined); @@ -51,6 +54,7 @@ export const GameProvider: React.FC = ({ children }) => { const [room, setRoom] = useState("") const [onlyFalse, setOnlyFalse] = useState(false) const [winner, setWinner] = useState(null) + const [dailyEnigme, setDailyEnigme] = useState[]>>(new Map()) const setIndicesData = (newIndices: Indice[]) => { @@ -102,6 +106,10 @@ export const GameProvider: React.FC = ({ children }) => { setWinner(winner) } + const setDailyEnigmeData = (map: Map[]>) => { + setDailyEnigme(map) + } + const reset = () => { setIndices([]) setActualPlayerIndex(-1) @@ -117,7 +125,7 @@ export const GameProvider: React.FC = ({ children }) => { } return ( - + {children} ); diff --git a/cryptide_project/src/Pages/Play.tsx b/cryptide_project/src/Pages/Play.tsx index 134ce23..281087a 100644 --- a/cryptide_project/src/Pages/Play.tsx +++ b/cryptide_project/src/Pages/Play.tsx @@ -26,11 +26,15 @@ import { PlayerProps } from '../types/Player'; import Player from '../model/Player'; import Human from '../model/User'; import User from '../model/User'; +import EnigmeDuJourCreator from '../model/EnigmeDuJourCreator'; +import Stub from '../model/Stub'; +let first = true function Play() { const theme=useTheme() const {isLoggedIn, login, user, setUserData } = useAuth(); + const {setDailyEnigmeData} = useGame() useEffect(() => { const fetchUserInformation = async () => { @@ -92,6 +96,11 @@ function Play() { setPersonNetworkData(networkPerson) setIndicesData(choosenIndices) setIndicesData(choosenIndices) + if (first){ + first = false + const map = EnigmeDuJourCreator.createEnigme(networkPerson, choosenIndices, choosenPerson, Stub.GenerateIndice()) + setDailyEnigmeData(map) + } navigate('/game?solo=true'); } diff --git a/cryptide_project/src/Translations/fr.json b/cryptide_project/src/Translations/fr.json index e9cf193..5b37344 100644 --- a/cryptide_project/src/Translations/fr.json +++ b/cryptide_project/src/Translations/fr.json @@ -55,7 +55,7 @@ "color_start": "Le suspect a les cheveux", "color_end": "", - "nb_friends_indice_start": "Le suspect", + "nb_friends_indice_start": "Le suspect a", "nb_friends_indice_end": "amis", "nb_sports_indice_start": "Le suspect pratique", diff --git a/cryptide_project/src/model/EnigmeDuJourCreator.ts b/cryptide_project/src/model/EnigmeDuJourCreator.ts new file mode 100644 index 0000000..126c3bb --- /dev/null +++ b/cryptide_project/src/model/EnigmeDuJourCreator.ts @@ -0,0 +1,74 @@ +import IndiceTesterFactory from "./Factory/IndiceTesterFactory"; +import Indice from "./Indices/Indice"; +import Pair from "./Pair"; +import Person from "./Person"; +import PersonNetwork from "./PersonsNetwork"; + +class EnigmeDuJourCreator{ + + + static createEnigme(personNetwork: PersonNetwork, choosenIndices: Indice[], choosenPerson: Person, allIndices: Indice[]): Map[]>{ + const map = new Map[]>() + personNetwork.getPersons().forEach((p) =>{ + map.set(p.getId(), []) + }) + + console.log("START ENIGME") + + choosenIndices.forEach((choosenIndice) => { + const choosenIndiceTester = IndiceTesterFactory.Create(choosenIndice) + const modifiedPersons: Pair[] = [] + let possibleIndices: Indice[] = [...allIndices] + + let i = 0 + + while (possibleIndices.length != 1){ + let tmpPossibleIndices: Indice[] = [...possibleIndices] + let choosenPair : Pair = new Pair(personNetwork.getPersons()[0], true) + for(const person of personNetwork.getPersons().filter((p) => p.getId() !== choosenPerson.getId())){ + const veryTmpIndice = [...possibleIndices] + if (!choosenIndiceTester.Works(person)){ + possibleIndices.forEach((possibleIndice, index) =>{ + const tester = IndiceTesterFactory.Create(possibleIndice) + if (tester.Works(person)){ + const t = veryTmpIndice.findIndex((tmpIndice) => tmpIndice.getId() == possibleIndice.getId()) + if (t != -1){ + veryTmpIndice.splice(t, 1) + } + } + }) + if (veryTmpIndice.length{ + const tester = IndiceTesterFactory.Create(possibleIndice) + if (!tester.Works(person)){ + const t = veryTmpIndice.findIndex((tmpIndice) => tmpIndice.getId() == possibleIndice.getId()) + if (t != -1){ + veryTmpIndice.splice(t, 1) + } + } + }) + if (veryTmpIndice.length " + choosenIndice.ToString("fr")) + console.log("possibleIndices => " + possibleIndices[0].ToString("fr")) + modifiedPersons.forEach((pair) =>{ + map.get(pair.first.getId())?.push(new Pair(choosenIndice, pair.second)) + }) + }) + return map + } +} +export default EnigmeDuJourCreator \ No newline at end of file diff --git a/cryptide_project/src/model/Stub.ts b/cryptide_project/src/model/Stub.ts index eaff6c9..059f2e0 100644 --- a/cryptide_project/src/model/Stub.ts +++ b/cryptide_project/src/model/Stub.ts @@ -22,20 +22,14 @@ class Stub{ let test = 7 for (let i: Color=0; i<5; i++){ - for (let j: Color=0; j<5; j++){ - if (j==i){ - continue - } + for (let j: Color=i + 1; j<5; j++){ indices.push(new ColorIndice(test, [i, j])) test++ } } for (let i: Sport=0; i<5; i++){ - for (let j: Sport=0; j<5; j++){ - if (j==i){ - continue - } + for (let j: Sport=i + 1; j<5; j++){ indices.push(new SportIndice(test, [i, j])) test++ } diff --git a/cryptide_project/src/res/names.json b/cryptide_project/src/res/names.json index f96c31b..d64a2d3 100644 --- a/cryptide_project/src/res/names.json +++ b/cryptide_project/src/res/names.json @@ -22,7 +22,6 @@ "Riley", "Layla", "Stella", - "Aurora", "Natalie", "Zoe", "Lucy", @@ -48,7 +47,6 @@ "Bella", "Sadie", "Hailey", - "Aurora", "Liam", "Noah", "Oliver", @@ -69,7 +67,6 @@ "Jack", "Jayden", "Owen", - "Noah", "Ethan", "Mason", "Logan", @@ -93,4 +90,3 @@ "Julian" ] } - \ No newline at end of file From d4171022ffccbe70264e28f1b5c6071d615be2e6 Mon Sep 17 00:00:00 2001 From: Pierre Ferreira Date: Fri, 24 Nov 2023 11:35:57 +0100 Subject: [PATCH 2/5] =?UTF-8?q?ajout=20du=20bouton=20pour=20l'EdJ,=20et=20?= =?UTF-8?q?gestion=20de=20son=20interface=20en=20cons=C3=A9quence=20:zap:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Components/GraphContainer.tsx | 31 +++++++------- cryptide_project/src/Pages/InGame.tsx | 42 ++++++++++++------- cryptide_project/src/Pages/Play.tsx | 14 ++++++- 3 files changed, 56 insertions(+), 31 deletions(-) diff --git a/cryptide_project/src/Components/GraphContainer.tsx b/cryptide_project/src/Components/GraphContainer.tsx index a124dc7..7ec1cae 100644 --- a/cryptide_project/src/Components/GraphContainer.tsx +++ b/cryptide_project/src/Components/GraphContainer.tsx @@ -23,6 +23,7 @@ interface MyGraphComponentProps { changecptTour: (newcptTour : number) => void addToHistory: (message : string) => void solo : boolean + isDaily : boolean setNetwork: (network: Network) => void showLast: boolean } @@ -42,7 +43,7 @@ let lastNodes: NodePerson[] = [] let firstEnigme = true -const MyGraphComponent: React.FC = ({onNodeClick, handleShowTurnBar, handleTurnBarTextChange, playerTouched, setPlayerTouched, changecptTour, solo, addToHistory, showLast, setNetwork}) => { +const MyGraphComponent: React.FC = ({onNodeClick, handleShowTurnBar, handleTurnBarTextChange, playerTouched, setPlayerTouched, changecptTour, solo, isDaily, addToHistory, showLast, setNetwork}) => { let cptTour: number = 0 const {user} = useAuth() @@ -259,20 +260,22 @@ let cptTour: number = 0 setNetwork(network) - dailyEnigme.forEach((pairs, index) => { - pairs.forEach((pair) => { - const i = indices.findIndex((indice) => pair.first.getId() === indice.getId()) - console.log(index) - const node = networkData.nodes.get().find((n) => index == n.id) - if (node != undefined){ - networkData.nodes.update({id: node.id, label: node.label + positionToEmoji(i, pair.second)}) - const test = networkData.nodes.get().find((n) => index == n.id) - if (test!=undefined){ - console.log(test.label) + if (isDaily){ + dailyEnigme.forEach((pairs, index) => { + pairs.forEach((pair) => { + const i = indices.findIndex((indice) => pair.first.getId() === indice.getId()) + console.log(index) + const node = networkData.nodes.get().find((n) => index == n.id) + if (node != undefined){ + networkData.nodes.update({id: node.id, label: node.label + positionToEmoji(i, pair.second)}) + const test = networkData.nodes.get().find((n) => index == n.id) + if (test!=undefined){ + console.log(test.label) + } } - } - }) - }); + }) + }); + } indices.forEach((i, index) => { console.log(i.ToString("fr") + " => " + positionToEmoji(index, true)) diff --git a/cryptide_project/src/Pages/InGame.tsx b/cryptide_project/src/Pages/InGame.tsx index 7c04d6e..e3feff6 100644 --- a/cryptide_project/src/Pages/InGame.tsx +++ b/cryptide_project/src/Pages/InGame.tsx @@ -62,6 +62,13 @@ const InGame = ({locale, changeLocale}) => { IsSolo=false } + //* Gestion daily + let isDaily: boolean = true + const isDailytmp = params.get('daily'); + if (isDailytmp == "false"){ + isDaily=false + } + //* Historique const [history, setHistory] = useState([]); const [showLast, setShowLast] = useState(false) @@ -212,6 +219,7 @@ const InGame = ({locale, changeLocale}) => { changecptTour={changecptTour} addToHistory={addToHistory} solo={IsSolo} + isDaily={isDaily} setPlayerTouched={handleSetPlayerTouched} playerTouched={playerTouched} setNetwork={setNetworkData} @@ -219,7 +227,7 @@ const InGame = ({locale, changeLocale}) => { - {IsSolo && + {IsSolo && !isDaily &&
{
} - -
- {history.map((item, index) => ( -
{item}
- ))} -
+ {!isDaily && +
+ {history.map((item, index) => ( +
{item}
+ ))} +
+ }
*/} - {!IsSolo && + {!IsSolo && + } - {IsSolo && + {IsSolo && + + }
diff --git a/cryptide_project/src/Pages/Play.tsx b/cryptide_project/src/Pages/Play.tsx index 281087a..b6975b3 100644 --- a/cryptide_project/src/Pages/Play.tsx +++ b/cryptide_project/src/Pages/Play.tsx @@ -91,6 +91,16 @@ function Play() { } function launchMastermind(){ + const [networkPerson, choosenPerson, choosenIndices] = GameCreator.CreateGame(3, 30) + setPersonData(choosenPerson) + setPersonNetworkData(networkPerson) + setIndicesData(choosenIndices) + setIndicesData(choosenIndices) + navigate('/game?solo=true&daily=false'); + } + + + function launchEngimeJour(){ const [networkPerson, choosenPerson, choosenIndices] = GameCreator.CreateGame(3, 30) setPersonData(choosenPerson) setPersonNetworkData(networkPerson) @@ -101,9 +111,8 @@ function Play() { const map = EnigmeDuJourCreator.createEnigme(networkPerson, choosenIndices, choosenPerson, Stub.GenerateIndice()) setDailyEnigmeData(map) } - navigate('/game?solo=true'); + navigate('/game?solo=true&daily=true'); } - useEffect(() => { @@ -150,6 +159,7 @@ function Play() {
+ From a9061ae5047112ac240d36106e35fabeaefbf933 Mon Sep 17 00:00:00 2001 From: Pierre Ferreira Date: Mon, 27 Nov 2023 09:58:35 +0100 Subject: [PATCH 3/5] gestion de la page de fin de jeu de facon a ce qu'elle soit dynamique pour le mode de jeu (solo ou pas) + ajout de la statistique nombre de tour et temps :zap: --- .../src/Components/GraphContainer.tsx | 16 ++- cryptide_project/src/Contexts/GameContext.tsx | 19 ++- cryptide_project/src/Pages/EndGame.css | 35 +++++ cryptide_project/src/Pages/EndGame.tsx | 120 ++++++++++++++---- cryptide_project/src/Pages/Play.tsx | 4 +- 5 files changed, 159 insertions(+), 35 deletions(-) diff --git a/cryptide_project/src/Components/GraphContainer.tsx b/cryptide_project/src/Components/GraphContainer.tsx index 7ec1cae..4375ee1 100644 --- a/cryptide_project/src/Components/GraphContainer.tsx +++ b/cryptide_project/src/Components/GraphContainer.tsx @@ -44,10 +44,13 @@ let firstEnigme = true const MyGraphComponent: React.FC = ({onNodeClick, handleShowTurnBar, handleTurnBarTextChange, playerTouched, setPlayerTouched, changecptTour, solo, isDaily, addToHistory, showLast, setNetwork}) => { -let cptTour: number = 0 + let cptTour: number = 0 + + //* Gestion du temps : + const initMtn = new Date().getSeconds() const {user} = useAuth() - const { indices, indice, person, personNetwork, setNodeIdData, players, askedPersons, setActualPlayerIndexData, room, actualPlayerIndex, turnPlayerIndex, setTurnPlayerIndexData, setWinnerData, dailyEnigme } = useGame(); + const { indices, indice, person, personNetwork, setNodeIdData, players, askedPersons, setActualPlayerIndexData, room, actualPlayerIndex, turnPlayerIndex, setTurnPlayerIndexData, setWinnerData, dailyEnigme, setNbCoupData, settempsData} = useGame(); const params = new URLSearchParams(window.location.search); const navigate = useNavigate(); @@ -648,7 +651,13 @@ let cptTour: number = 0 works = false } if (index == indices.length - 1 && works){ - navigate("/endgame") + const Mtn = new Date().getSeconds() + + settempsData(Mtn - initMtn) + + cptTour ++; + setNbCoupData(cptTour) + navigate("/endgame?solo=true&daily=" + isDaily) } } @@ -657,7 +666,6 @@ let cptTour: number = 0 } addToHistory(person.getName() + " n'est pas le tueur !"); //TODO préciser le nombre d'indice qu'il a de juste - //TODO METTRE LA WIN CONDITION ICI AVEC LE MERGE cptTour ++; // On Incrémente le nombre de tour du joueur const tour = cptTour+1; addToHistory("<----- [Tour " + tour +"/"+networkData.nodes.length + "] ----->"); diff --git a/cryptide_project/src/Contexts/GameContext.tsx b/cryptide_project/src/Contexts/GameContext.tsx index ecc142d..e6f7b8f 100644 --- a/cryptide_project/src/Contexts/GameContext.tsx +++ b/cryptide_project/src/Contexts/GameContext.tsx @@ -19,6 +19,8 @@ interface GameContextProps { onlyFalse: boolean winner: Player | null dailyEnigme: Map[]> + nbCoup : number + temps : number setIndicesData: (newIndices: Indice[]) => void; setIndiceData: (newIndice: Indice) => void; setPersonData: (newPerson: Person) => void; @@ -33,6 +35,8 @@ interface GameContextProps { setWinnerData: (winner: Player) => void reset: () => void setDailyEnigmeData: (map: Map[]>) => void + setNbCoupData: (newNbCoup : number) => void + settempsData: (newtemps : number) => void } const GameContext = createContext(undefined); @@ -55,6 +59,8 @@ export const GameProvider: React.FC = ({ children }) => { const [onlyFalse, setOnlyFalse] = useState(false) const [winner, setWinner] = useState(null) const [dailyEnigme, setDailyEnigme] = useState[]>>(new Map()) + const [nbCoup, setNbCoup] = useState(0); + const [temps, settemps] = useState(0); const setIndicesData = (newIndices: Indice[]) => { @@ -110,6 +116,15 @@ export const GameProvider: React.FC = ({ children }) => { setDailyEnigme(map) } + + const setNbCoupData = (newNbCoup : number) => { + setNbCoup(newNbCoup); + } + + const settempsData = (newtemps : number) => { + settemps(newtemps); + } + const reset = () => { setIndices([]) setActualPlayerIndex(-1) @@ -122,10 +137,12 @@ export const GameProvider: React.FC = ({ children }) => { setTurnPlayerIndex(-1) setNodeId(-1) setIndice(null) + setNbCoup(0) + settemps(0) } return ( - + {children} ); diff --git a/cryptide_project/src/Pages/EndGame.css b/cryptide_project/src/Pages/EndGame.css index 9af5187..2cb9654 100644 --- a/cryptide_project/src/Pages/EndGame.css +++ b/cryptide_project/src/Pages/EndGame.css @@ -79,4 +79,39 @@ margin: 0 15px 0 15px; padding: 10px; box-shadow: 5px 5px 5px rgb(246, 246, 246); +} + +.SoloContainer{ + display: flex; + flex-direction: column; + align-items: center; + + border: solid 1px whitesmoke; + border-radius: 15px; + background-color: white; + + max-width: 50%; +} + +.indicesolo{ + display: flex; + flex-wrap: wrap; + justify-content: space-evenly; + + /* margin: 10px 0; */ + /* max-height: 200px; */ +} + +.solostat{ + display: flex; + justify-content: space-between; + width: 70%; +} + +.solostat p { + border: solid 1px whitesmoke; + border-radius: 15px; + background-color: white; + + padding: 10px; } \ No newline at end of file diff --git a/cryptide_project/src/Pages/EndGame.tsx b/cryptide_project/src/Pages/EndGame.tsx index d588183..3948253 100644 --- a/cryptide_project/src/Pages/EndGame.tsx +++ b/cryptide_project/src/Pages/EndGame.tsx @@ -22,62 +22,126 @@ import { Link } from 'react-router-dom'; /* lang */ import { FormattedMessage } from 'react-intl'; import { useGame } from '../Contexts/GameContext'; +import { map } from 'lodash'; +import Player from '../model/Player'; function EndGame() { + const params = new URLSearchParams(window.location.search); + + //* Gestion solo + let IsSolo: boolean = false + const solotmp = params.get('solo'); + if (solotmp == "true"){ + IsSolo=true + } + + + //* Gestion daily + let IsDaily: boolean = false + const dailytmp = params.get('daily'); + if (dailytmp == "true"){ + IsDaily=true + } + const {reset} = useGame() const resetAll = () => { reset() } - - const {winner, person, players, indices} =useGame() + + const {winner, person, players, indices, nbCoup, temps} =useGame() + console.log(winner) let indice = indices[0] - const index = players.findIndex((p) => p.id == winner?.id) - if (index != -1) { - indice = indices[index] - } + let losingPlayers : Player[]; + if(!IsSolo){ + const index = players.findIndex((p) => p.id == winner?.id) + if (index != -1) { + indice = indices[index] + } + - let losingPlayers; - if (winner != null) { - losingPlayers = players.filter(player => player.id !== winner.id); - } else { - losingPlayers = players; + if (winner != null) { + losingPlayers = players.filter(player => player.id !== winner.id); + } else { + losingPlayers = players; + } + } + else{ + losingPlayers = []; } - const theme = useTheme(); return (
+ {!IsSolo && +
+
+
+

{winner?.pseudo} a gagné !

+

Le tueur était {person?.getName()}

+
+
+
+ +

{indices[players.findIndex((p) => p.id == winner?.id)].ToString("fr")}

+
+
+
+ +
+
+ {losingPlayers.map((player, index) => ( +
+ {player.id !== winner?.id && ( +
+ {}} index={index} showCircle={false}/> +
{indices[players.findIndex((p) => p.id == player?.id)].ToString("fr")}
+
+ )} +
+ ))} +
+
+ +
+
+
+ }
-
-

{winner?.pseudo} a gagné !

-

Le tueur était {person?.getName()}

-
+
+

Vous avez gagné !

+

Le tueur était {person?.getName()}

+
-

{indices[players.findIndex((p) => p.id == winner?.id)].ToString("fr")}

+

[ {winner?.pseudo} ]

+
-
- {losingPlayers.map((player, index) => ( -
- {player.id !== winner?.id && ( -
- {}} index={index} showCircle={false}/> -
{indices[players.findIndex((p) => p.id == player?.id)].ToString("fr")}
-
- )} -
- ))} +
+
+ {!IsDaily &&

Nombre de coups : {nbCoup}

} +

Temps : {temps}s

+
+
+ {indices.map((indice, index) => ( + //
+
+
Indice {index+1} : {indice.ToString("fr")}
+
+ //
+ )) + } +
diff --git a/cryptide_project/src/Pages/Play.tsx b/cryptide_project/src/Pages/Play.tsx index b6975b3..7c6ae2b 100644 --- a/cryptide_project/src/Pages/Play.tsx +++ b/cryptide_project/src/Pages/Play.tsx @@ -75,10 +75,10 @@ function Play() { console.error(error); } }; - + fetchUserInformation(); }, [isLoggedIn]); - + const { setIndicesData, setPersonData, setPersonNetworkData } = useGame(); From d843c3ba9823a2812e7ad82661c6473bc4a74eb3 Mon Sep 17 00:00:00 2001 From: Pierre Ferreira Date: Mon, 27 Nov 2023 10:16:58 +0100 Subject: [PATCH 4/5] ajout de la db dans le .gitignore :see_no_evil: --- .gitignore | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 74524a9..039af32 100644 --- a/.gitignore +++ b/.gitignore @@ -41,4 +41,9 @@ bower_components psd thumb -sketch \ No newline at end of file +sketch + + +# db + +socialgraph.db \ No newline at end of file From 211dbeab1a0158558e1a457426b15caf41e97386 Mon Sep 17 00:00:00 2001 From: Baptiste Marcel Date: Mon, 27 Nov 2023 11:36:34 +0100 Subject: [PATCH 5/5] jsp --- cryptide_project/src/server/db/socialgraph.db | Bin 28672 -> 28672 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/cryptide_project/src/server/db/socialgraph.db b/cryptide_project/src/server/db/socialgraph.db index cfc4f11818758f0a2aca50869bac646c50738c55..28dd3737335ac2c8b19c8043df3db622c3098a41 100644 GIT binary patch delta 221 zcmZp8z}WDBae_3X*F+g-Mz4(thh#m{e9|L5)0`{aa|84ON<4DYGrheEQavNf4U>|? z%`$xQic<Ds^R41WaMOLfrxOhGea2c E0Q!75*Z=?k delta 163 zcmZp8z}WDBae_3X;Y1l{M#GH>hh#kpy-nQwoqZAwO-y}#U4pzlef=W*Q%lXN+>=tW z&CGm^gPjY_1A{$H3^UWci%eZ3Q!>*tjSP&8bqx)5jf@oxjjc=#tc;B|XURn