|
|
@ -135,17 +135,6 @@ function Play() {
|
|
|
|
if (!showOverlay)setShowOverlay(true)
|
|
|
|
if (!showOverlay)setShowOverlay(true)
|
|
|
|
else setShowOverlay(true)
|
|
|
|
else setShowOverlay(true)
|
|
|
|
|
|
|
|
|
|
|
|
// const [networkPerson, choosenPerson, choosenIndices] = GameCreator.CreateGame(3, 30)
|
|
|
|
|
|
|
|
// setPersonData(choosenPerson)
|
|
|
|
|
|
|
|
// 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&daily=true');
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -172,6 +161,7 @@ function Play() {
|
|
|
|
}, [room, navigate]);
|
|
|
|
}, [room, navigate]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const [showOverlay, setShowOverlay] = useState(false);
|
|
|
|
const [showOverlay, setShowOverlay] = useState(false);
|
|
|
|
const [selectedDifficulty, setSelectedDifficulty] = useState(null);
|
|
|
|
const [selectedDifficulty, setSelectedDifficulty] = useState(null);
|
|
|
|
|
|
|
|
|
|
|
@ -183,11 +173,13 @@ function Play() {
|
|
|
|
const handleStartEasyGame = () => {
|
|
|
|
const handleStartEasyGame = () => {
|
|
|
|
|
|
|
|
|
|
|
|
//* Mode facile
|
|
|
|
//* Mode facile
|
|
|
|
|
|
|
|
//todo différencier les deux
|
|
|
|
const [networkPerson, choosenPerson, choosenIndices] = GameCreator.CreateGame(3, 30)
|
|
|
|
const [networkPerson, choosenPerson, choosenIndices] = GameCreator.CreateGame(3, 30)
|
|
|
|
setPersonData(choosenPerson)
|
|
|
|
setPersonData(choosenPerson)
|
|
|
|
setPersonNetworkData(networkPerson)
|
|
|
|
setPersonNetworkData(networkPerson)
|
|
|
|
setIndicesData(choosenIndices)
|
|
|
|
setIndicesData(choosenIndices)
|
|
|
|
setIndicesData(choosenIndices)
|
|
|
|
setIndicesData(choosenIndices)
|
|
|
|
|
|
|
|
|
|
|
|
navigate('/game?solo=true&daily=true&easy=true');
|
|
|
|
navigate('/game?solo=true&daily=true&easy=true');
|
|
|
|
setShowOverlay(false);
|
|
|
|
setShowOverlay(false);
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -211,7 +203,6 @@ function Play() {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
|
|
|
|
|
|
|
|
<div className="MainContainer">
|
|
|
|
<div className="MainContainer">
|
|
|
@ -234,6 +225,8 @@ function Play() {
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className='buttonGroupVertical'>
|
|
|
|
<div className='buttonGroupVertical'>
|
|
|
|
<button onClick={launchMastermind} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Jouer seul </button>
|
|
|
|
<button onClick={launchMastermind} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Jouer seul </button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<button ref={target} onClick={launchEngimeJour} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Résoudre une énigme</button>
|
|
|
|
<button ref={target} onClick={launchEngimeJour} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Résoudre une énigme</button>
|
|
|
|
<Overlay show={showOverlay} target={target.current} placement="bottom" rootClose={true} rootCloseEvent='click'>
|
|
|
|
<Overlay show={showOverlay} target={target.current} placement="bottom" rootClose={true} rootCloseEvent='click'>
|
|
|
|
{({ placement, arrowProps, show: _show, popper, ...props }) => (
|
|
|
|
{({ placement, arrowProps, show: _show, popper, ...props }) => (
|
|
|
@ -255,7 +248,6 @@ function Play() {
|
|
|
|
</Overlay>
|
|
|
|
</Overlay>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<button onClick={createLobby} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Créer une partie </button>
|
|
|
|
<button onClick={createLobby} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Créer une partie </button>
|
|
|
|
<button className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Rejoindre </button>
|
|
|
|
<button className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Rejoindre </button>
|
|
|
|
|
|
|
|
|
|
|
|