Merge pull request 'fixRT6' (#68) from fixRT6 into master

Reviewed-on: #68
pull/73/head^2
Pierre FERREIRA 11 months ago
commit 6aad28e3f4

@ -27,6 +27,7 @@
"react-icons": "^4.11.0", "react-icons": "^4.11.0",
"react-intl": "^6.5.2", "react-intl": "^6.5.2",
"react-router-dom": "^6.18.0", "react-router-dom": "^6.18.0",
"react-router-hash-link": "^2.4.3",
"react-scripts": "5.0.1", "react-scripts": "5.0.1",
"react-switch": "^7.0.0", "react-switch": "^7.0.0",
"socket.io": "^4.7.2", "socket.io": "^4.7.2",
@ -36,6 +37,7 @@
"web-vitals": "^2.1.4" "web-vitals": "^2.1.4"
}, },
"devDependencies": { "devDependencies": {
"@types/react-router-hash-link": "^2.4.9",
"@types/uuid": "^9.0.7" "@types/uuid": "^9.0.7"
} }
}, },
@ -4289,6 +4291,12 @@
"integrity": "sha512-pdGBkAh4ggfXAkiwgmTdROJe3mwvLWJYm6JiaAwCtskAU0Weh+JQyyMTbhvxjxD2n8sr8PrxVwyDzmpnK4pUrQ==", "integrity": "sha512-pdGBkAh4ggfXAkiwgmTdROJe3mwvLWJYm6JiaAwCtskAU0Weh+JQyyMTbhvxjxD2n8sr8PrxVwyDzmpnK4pUrQ==",
"peer": true "peer": true
}, },
"node_modules/@types/history": {
"version": "4.7.11",
"resolved": "https://registry.npmjs.org/@types/history/-/history-4.7.11.tgz",
"integrity": "sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA==",
"dev": true
},
"node_modules/@types/hoist-non-react-statics": { "node_modules/@types/hoist-non-react-statics": {
"version": "3.3.5", "version": "3.3.5",
"resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz", "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz",
@ -4459,6 +4467,38 @@
"@types/react": "*" "@types/react": "*"
} }
}, },
"node_modules/@types/react-router": {
"version": "5.1.20",
"resolved": "https://registry.npmjs.org/@types/react-router/-/react-router-5.1.20.tgz",
"integrity": "sha512-jGjmu/ZqS7FjSH6owMcD5qpq19+1RS9DeVRqfl1FeBMxTDQAGwlMWOcs52NDoXaNKyG3d1cYQFMs9rCrb88o9Q==",
"dev": true,
"dependencies": {
"@types/history": "^4.7.11",
"@types/react": "*"
}
},
"node_modules/@types/react-router-dom": {
"version": "5.3.3",
"resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.3.3.tgz",
"integrity": "sha512-kpqnYK4wcdm5UaWI3fLcELopqLrHgLqNsdpHauzlQktfkHL3npOSwtj1Uz9oKBAzs7lFtVkV8j83voAz2D8fhw==",
"dev": true,
"dependencies": {
"@types/history": "^4.7.11",
"@types/react": "*",
"@types/react-router": "*"
}
},
"node_modules/@types/react-router-hash-link": {
"version": "2.4.9",
"resolved": "https://registry.npmjs.org/@types/react-router-hash-link/-/react-router-hash-link-2.4.9.tgz",
"integrity": "sha512-zl/VMj+lfJZhvjOAQXIlBVPNKSK+/fRG8AUHhlP9++LhlA2ziLeTmbRxIMJI3PCiCTS+W/FosEoDRoNOGH0OzA==",
"dev": true,
"dependencies": {
"@types/history": "^4.7.11",
"@types/react": "*",
"@types/react-router-dom": "^5.3.0"
}
},
"node_modules/@types/react-transition-group": { "node_modules/@types/react-transition-group": {
"version": "4.4.8", "version": "4.4.8",
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.8.tgz", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.8.tgz",
@ -14831,6 +14871,18 @@
"react-dom": ">=16.8" "react-dom": ">=16.8"
} }
}, },
"node_modules/react-router-hash-link": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/react-router-hash-link/-/react-router-hash-link-2.4.3.tgz",
"integrity": "sha512-NU7GWc265m92xh/aYD79Vr1W+zAIXDWp3L2YZOYP4rCqPnJ6LI6vh3+rKgkidtYijozHclaEQTAHaAaMWPVI4A==",
"dependencies": {
"prop-types": "^15.7.2"
},
"peerDependencies": {
"react": ">=15",
"react-router-dom": ">=4"
}
},
"node_modules/react-scripts": { "node_modules/react-scripts": {
"version": "5.0.1", "version": "5.0.1",
"resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz",

@ -21,13 +21,11 @@
"react-icons": "^4.11.0", "react-icons": "^4.11.0",
"react-intl": "^6.5.2", "react-intl": "^6.5.2",
"react-router-dom": "^6.18.0", "react-router-dom": "^6.18.0",
"react-router-hash-link": "^2.4.3",
"react-scripts": "5.0.1", "react-scripts": "5.0.1",
"react-switch": "^7.0.0", "react-switch": "^7.0.0",
"socket.io": "^4.7.2", "socket.io": "^4.7.2",
"socket.io-client": "^4.7.2", "socket.io-client": "^4.7.2",
"socket.io": "^4.7.2",
"socket.io-client": "^4.7.2",
"react-switch": "^7.0.0",
"typescript": "^5.2.2", "typescript": "^5.2.2",
"vis-network": "^9.1.9", "vis-network": "^9.1.9",
"web-vitals": "^2.1.4" "web-vitals": "^2.1.4"
@ -57,6 +55,7 @@
] ]
}, },
"devDependencies": { "devDependencies": {
"@types/react-router-hash-link": "^2.4.9",
"@types/uuid": "^9.0.7" "@types/uuid": "^9.0.7"
} }
} }

@ -78,7 +78,7 @@ function App() {
<Route path="/lobby" element={<Lobby/>} /> <Route path="/lobby" element={<Lobby/>} />
<Route path="/endgame" element={<EndGame/>} /> <Route path="/endgame" element={<EndGame/>} />
<Route path="/game" element={<InGame locale={locale} changeLocale={changeLocale}/>}/> <Route path="/game" element={<InGame locale={locale} changeLocale={changeLocale}/>}/>
<Route path="/info" element={<InfoPage/>} /> <Route path="/info" element={<InfoPage locale={locale} changeLocale={changeLocale}/>} />
{/* <Route path="/solo" element={<SoloGame locale={locale} changeLocale={changeLocale} />}/> */} {/* <Route path="/solo" element={<SoloGame locale={locale} changeLocale={changeLocale} />}/> */}
</Routes> </Routes>
</BrowserRouter> </BrowserRouter>

@ -0,0 +1,34 @@
import React from 'react';
/* Style */
import '../Style/Global.css';
//import { useTheme } from '../Style/ThemeContext';
/* Model */
import Stub from '../model/Stub';
import Indice from '../model/Indices/Indice';
/* lang */
import { FormattedMessage } from 'react-intl';
interface IndiceListComponentProps<T extends Indice> {
instance: (new (...args: any[]) => T) | (Function & { prototype: T });
lang: string;
}
const IndiceList: React.FC<IndiceListComponentProps<any>> = ({ instance, lang }) => {
const indices = Stub.GenerateIndice();
return (
<>
<ul className='listContainer'>
{indices
.filter((i) => i instanceof instance)
.map((indice, index) => (
<p key={index}>{indice.ToString(lang)}</p>
))}
</ul>
</>
);
}
export default IndiceList;

@ -107,7 +107,7 @@
.button{ .button{
/*background-color: #85C9C2;*/ /*background-color: #85C9C2;*/
border: solid 2px #85C9C2; border: solid 2px #7aa3f4;
border-radius: 10px; border-radius: 10px;
width: 100px; width: 100px;

@ -19,6 +19,7 @@ import Replay from "../res/icon/replay.png";
import Info from "../res/icon/infoGreen.png"; import Info from "../res/icon/infoGreen.png";
import Check from "../res/icon/checkboxGreen.png"; import Check from "../res/icon/checkboxGreen.png";
import Alpha from "../res/GreekLetters/alphaW.png"; import Alpha from "../res/GreekLetters/alphaW.png";
import MGlass from "../res/icon/magnifying-glass.png";
/* nav */ /* nav */
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
@ -34,6 +35,8 @@ import { Nav, NavDropdown } from 'react-bootstrap';
import { FormattedMessage } from 'react-intl'; import { FormattedMessage } from 'react-intl';
import Color from '../model/Color'; import Color from '../model/Color';
import { useGame } from '../Contexts/GameContext'; import { useGame } from '../Contexts/GameContext';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { NavLink } from 'react-router-dom';
//@ts-ignore //@ts-ignore
const InGame = ({locale, changeLocale}) => { const InGame = ({locale, changeLocale}) => {
@ -138,7 +141,7 @@ const InGame = ({locale, changeLocale}) => {
{IsSolo ? ( {IsSolo ? (
<div className='nbLaps' style={{ <div className='nbLaps' style={{
backgroundColor: theme.colors.primary, backgroundColor: theme.colors.tertiary,
borderColor: theme.colors.secondary borderColor: theme.colors.secondary
}}> }}>
Tour : {cptTour} Tour : {cptTour}
@ -147,7 +150,7 @@ const InGame = ({locale, changeLocale}) => {
<div className='playerlistDiv'> <div className='playerlistDiv'>
<button className='button' <button className='button'
style={{ style={{
backgroundColor: theme.colors.primary, backgroundColor: theme.colors.tertiary,
borderColor: theme.colors.secondary borderColor: theme.colors.secondary
}} }}
onClick={handleChangeP}> onClick={handleChangeP}>
@ -161,7 +164,7 @@ const InGame = ({locale, changeLocale}) => {
<div className='paramDiv'> <div className='paramDiv'>
<button className='button' <button className='button'
style={{ style={{
backgroundColor: theme.colors.primary, backgroundColor: theme.colors.tertiary,
borderColor: theme.colors.secondary borderColor: theme.colors.secondary
}} }}
onClick={handleChangeS}> onClick={handleChangeS}>
@ -170,10 +173,13 @@ const InGame = ({locale, changeLocale}) => {
</div> </div>
<div className='menuGame'> <div className='menuGame'>
{/* <Link to='/info#indice-possible' target='_blank'>
//? redirection impossible apparament (securité des navigateur
*/}
<Link to='/info' target='_blank'> <Link to='/info' target='_blank'>
<button className='button' <button className='button'
style={{ style={{
backgroundColor: theme.colors.primary, backgroundColor: theme.colors.tertiary,
borderColor: theme.colors.secondary borderColor: theme.colors.secondary
}}> }}>
<img src={Info} alt="info" height="40"/> <img src={Info} alt="info" height="40"/>
@ -186,7 +192,7 @@ const InGame = ({locale, changeLocale}) => {
<Link to='/info' target='_blank'> <Link to='/info' target='_blank'>
<button className='button' <button className='button'
style={{ style={{
backgroundColor: theme.colors.primary, backgroundColor: theme.colors.tertiary,
borderColor: theme.colors.secondary borderColor: theme.colors.secondary
}}> }}>
<img src={Check} alt="check" height="40"/> <img src={Check} alt="check" height="40"/>
@ -195,10 +201,10 @@ const InGame = ({locale, changeLocale}) => {
<button className='button' onClick={handleChange} <button className='button' onClick={handleChange}
style={{ style={{
backgroundColor: theme.colors.primary, backgroundColor: theme.colors.tertiary,
borderColor: theme.colors.secondary borderColor: theme.colors.secondary
}}> }}>
<img src={Alpha} alt="indice" height="40"/> <img src={MGlass} alt="indice" height="40"/>
</button> </button>
</div> </div>

@ -0,0 +1,142 @@
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700;800;900&display=swap"); /** import de la font */
.infoPage{
margin: 20px 100px;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Poppins", sans-serif;
}
/** Sommaire */
.list {
max-width: 25%;
position: relative;
}
.list ul {
position: relative;
}
.list ul li {
position: relative;
left: 0;
color: #fce4ec;
list-style: none;
margin: 4px 0;
border-left: 2px solid #0052B8;
transition: 0.5s;
cursor: pointer;
}
.list ul li:hover {
left: 10px;
}
.list ul li span {
position: relative;
padding: 8px;
padding-left: 12px;
display: inline-block;
z-index: 1;
transition: 0.5s;
color: #000;
}
.list ul li:hover span {
color: #fff;
}
.list ul li:before {
content: "";
position: absolute;
width: 100%;
height: 100%;
background: #0052B8;
transform: scaleX(0);
transform-origin: left;
transition: 0.5s;
}
.list ul li:hover:before {
transform: scaleX(1);
}
li *{
font-size: larger;
font-weight: bold;
text-decoration: none;
}
.LiInterfaceDisplay{
display: flex;
justify-content: start;
margin-bottom: 20px;
}
.LiInterfaceDisplay p{
font-size: medium;
}
h2 {
position: relative;
padding: 0;
margin: 0;
font-family: "Raleway", sans-serif;
font-weight: 300;
font-size: 40px;
color: #080808;
-webkit-transition: all 0.4s ease 0s;
-o-transition: all 0.4s ease 0s;
transition: all 0.4s ease 0s;
}
h2 span {
display: block;
font-size: 0.5em;
line-height: 1.3;
}
h2 em {
font-style: normal;
font-weight: 600;
}
.infoPage h2 {
font-size: 28px;
font-weight: 500;
letter-spacing: 0;
line-height: 1.5em;
padding-bottom: 15px;
position: relative;
}
.infoPage h2:before {
content: "";
position: absolute;
left: 0;
bottom: 0;
height: 5px;
width: 55px;
background-color: #111;
}
.infoPage h2:after {
content: "";
position: absolute;
left: 0;
bottom: 2px;
height: 1px;
width: 95%;
max-width: 255px;
background-color: #333;
}
h4{
font-size: 25px;
position: relative;
padding: 0;
margin: 20px 0 0 0;
font-family: "Raleway", sans-serif;
}
.h5title{
margin: 50px 0 0 0;
font-family: "Raleway", sans-serif;
}
/* .infoPage h2{
text-decoration: underline;
font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
} */

@ -2,63 +2,277 @@ import React from 'react';
/* Style */ /* Style */
import '../Style/Global.css'; import '../Style/Global.css';
import './InfoPage.css';
import { FormattedMessage } from 'react-intl'; import { FormattedMessage } from 'react-intl';
import { useGame } from '../Contexts/GameContext';
import ColorIndice from '../model/Indices/ColorIndice';
import Stub from '../model/Stub';
import SportIndice from '../model/Indices/SportIndice';
import EdgesIndice from '../model/Indices/EdgesIndice';
import NbEdgesIndice from '../model/Indices/NbEdgesIndice';
import NbSportIndice from '../model/Indices/NbSportIndice';
import AgeIndice from '../model/Indices/AgeIndice';
import ColorEdgesIndice from '../model/Indices/ColorEdgesIndice';
import IndiceList from '../Components/IndiceList';
import { HashLink as Link } from 'react-router-hash-link';
import { ColorToHexa } from '../model/EnumExtender';
import Color from '../model/Color';
import "./InGame.css"
import {useTheme} from '../Style/ThemeContext'
import Check from "../res/icon/checkboxGreen.png";
import Alert from 'react-bootstrap/Alert';
import MGlass from "../res/icon/magnifying-glass.png";
import Param from "../res/icon/param.png";
import Info from "../res/icon/infoGreen.png"; //todo changer la couleur de l'icon
//@ts-ignore
function InfoPage({locale, changeLocale}) {
function InfoPage() { //! cette page n'affiche que des informations et est suceptible de changer selon le context. const theme = useTheme();
const styles = {
roux: { backgroundColor: ColorToHexa(Color.REDHEAD), width: '15px', height: '15px', display: 'inline-block', marginRight: '5px' },
blond: { backgroundColor: ColorToHexa(Color.BLOND), width: '15px', height: '15px', display: 'inline-block', marginRight: '5px' },
noir: { backgroundColor: ColorToHexa(Color.BLACK), width: '15px', height: '15px', display: 'inline-block', marginRight: '5px' },
blanc: { backgroundColor: ColorToHexa(Color.WHITE), border: '1px solid #ccc', width: '15px', height: '15px', display: 'inline-block', marginRight: '5px' },
chatain: { backgroundColor: ColorToHexa(Color.BROWN), width: '15px', height: '15px', display: 'inline-block', marginRight: '5px' },
};
return ( return (
//! Il faudra possiblement faire une gestion des mode de jeu, pour modifier les regles en fonction de ce dernier.
<div className='infoPage'>
<h1><FormattedMessage id="informations"/></h1>
<div> <div>
<h1>Informations</h1> <h2><FormattedMessage id="info.intro.title"/></h2>
<p>
<FormattedMessage id="info.intro.text"/>
</p>
</div>
<div className="list">
<h2> <FormattedMessage id="info.sommaire"/> </h2>
<ul>
<li><Link to="#composants-du-jeu"><span><FormattedMessage id="info.title.composant"/></span></Link></li>
<li><Link to="#objectif-du-jeu"><span><FormattedMessage id="info.title.objectif"/></span></Link></li>
<li><Link to="#deroulement-du-jeu"><span><FormattedMessage id="info.title.deroulement"/></span></Link></li>
<li><Link to="#indice-possible"><span><FormattedMessage id="info.title.indice_possible"/></span></Link></li>
</ul>
</div>
<h2>Indice possible :</h2> <section id="composants-du-jeu">
<h3> <h2><FormattedMessage id="info.pions"/> :</h2>
couleur de cheveux d'une personne <h4>
</h3> <FormattedMessage id="info.sommaire"/>
</h4>
<h6><FormattedMessage id="info.composant.text"/></h6>
<ul>
<p>
<li><h5 className='h5title'><FormattedMessage id="info.composant.carre.title"/> : 🟪🟦🟩🟨🟥🟫</h5></li>
<FormattedMessage id="info.composant.carre"/>
<li><h5 className='h5title'><FormattedMessage id="info.composant.rond.title"/> : 🟣🔵🟢🟡🔴🟤</h5></li>
<FormattedMessage id="info.composant.rond"/>
</p>
</ul>
<hr/>
<h4>
<FormattedMessage id="info.car_perso"/>
</h4>
<h6><FormattedMessage id="info.composant.textcar"/></h6>
<p>
{/*
//TODO mettre icon des ages apres le merge
*/}
<h5 className='h5title'><FormattedMessage id="info.composant.age.title"/> :</h5>
<FormattedMessage id="info.composant.age"/><Link to="#indice-possible"><FormattedMessage id="info.composant.age.link"/></Link>.
<h5 className='h5title'><FormattedMessage id="info.composant.hair_col.title"/> :</h5>
<FormattedMessage id="info.composant.hair_col"/>
<ul> <ul>
<li> <li>
Possède les cheveux noir <span style={styles.blanc}></span>
<FormattedMessage id="hair.blanc"/>
</li> </li>
<li> <li>
Possède les cheveux roux <span style={styles.blond}></span>
<FormattedMessage id="hair.blond"/>
</li> </li>
<li> <li>
Possède les cheveux blond <span style={styles.roux}></span>
<FormattedMessage id="hair.roux"/>
</li> </li>
<li> <li>
Possède les cheveux brun <span style={styles.chatain}></span>
<FormattedMessage id="hair.chatain"/>
</li> </li>
<li> <li>
Possède les cheveux blanc <span style={styles.noir}></span>
<FormattedMessage id="hair.noir"/>
</li> </li>
</ul> </ul>
<h5 className='h5title'><FormattedMessage id="info.composant.sport.title"/> : 🏀🎳🎾</h5>
<FormattedMessage id="info.composant.sport"/>
<ul>
<li> <FormattedMessage id="info.composant.baseball"/></li>
<li>🏀 <FormattedMessage id="info.composant.basketball"/></li>
<li>🎳 <FormattedMessage id="info.composant.bowling"/></li>
<li> <FormattedMessage id="info.composant.football"/></li>
<li>🎾 <FormattedMessage id="info.composant.tennis"/></li>
</ul>
<FormattedMessage id="info.composant.sport.bis"/>
</p>
</section>
<hr/> <hr/>
<h3> <section id="objectif-du-jeu">
Sport d'une personne <h2><FormattedMessage id="info.title.objectif"/> :</h2>
</h3> <p>
<FormattedMessage id="info.objectif.intro"/>
</p>
<h4>
<FormattedMessage id="info.objectif.t1"/> :
</h4>
<p>
<FormattedMessage id="info.objectif.t1.text"/>
</p>
<h4><FormattedMessage id="info.objectif.t2"/> :</h4>
<p>
<FormattedMessage id="info.objectif.t2.text"/>
</p>
<h4><FormattedMessage id="info.objectif.t3"/> :</h4>
<p>
<FormattedMessage id="info.objectif.t3.text"/>
</p>
<h4>
Interface :
</h4>
<h6> Pour chacune des parties, vous aurez certains éléments d'interface à disposition :</h6>
<ul> <ul>
<li> <li>
Effectue du Foot <u>ou</u> du tennis <div className='LiInterfaceDisplay'>
<button className='button'
style={{
backgroundColor: theme.colors.tertiary,
borderColor: theme.colors.secondary,
margin:"0 20px"
}}>
<img src={Param} alt="paramètres" height='40'/>
</button>
<p>
Le bouton "<b>Paramètre</b>" permet l'affichage et la gestion de différent paramètres de la partie, comme par exemple le language, l'aide ... .
</p>
</div>
<Alert variant='danger'>
Attention, cette partie ne peut pas être complétée tant que tout les paramètres n'ont pas été choisis !
</Alert>
</li> </li>
<li> <li>
Effectue du rugby <u>ou</u> du tennis <div className='LiInterfaceDisplay'>
<button className='button'
style={{
backgroundColor: theme.colors.tertiary,
borderColor: theme.colors.secondary,
margin:"0 20px"
}}>
<img src={Info} alt="info" height="40"/>
</button>
<p>
Le bouton "<b>Information</b>" permet de rediriger vers la page de règle du jeu (celle ci).
{/*
//! mais est ce que nous devons rediriger sur les indices possibles ?
*/}
</p>
</div>
</li> </li>
</ul>
<h3>
Caractèristique des voisins
</h3>
<ul>
<li> <li>
Possède deux voisins footballeur <div className='LiInterfaceDisplay'>
<button className='button'
style={{
backgroundColor: theme.colors.tertiary,
borderColor: theme.colors.secondary,
margin:"0 20px"
}}>
<img src={Check} alt="check" height="40"/>
</button>
<p>
Le bouton "<b>Fiche de déduction d'indice</b>" permet l'affichage de tableau dynamic permettant, avec le déroulé de la partie, de déduire quels indices sont les plus probables.
</p>
</div>
<Alert variant='danger'>
Attention, cette partie ne peut pas être complétée tant que la page et l'algorithme dédié ne sont pas fait !
</Alert>
</li> </li>
<li> <li>
Possède aucun voisin rugbyman <div className='LiInterfaceDisplay'>
<button className='button'
style={{
backgroundColor: theme.colors.tertiary,
borderColor: theme.colors.secondary,
margin:"0 20px"
}}>
<img src={MGlass} alt="indice" height="40"/>
</button>
<p>
Le bouton "<b>Indice personnel</b>" est le plus important, en effet il permet d'afficher quel est votre indice secret. Vous seul le connaissais ! Il va falloir ruser pour tromper vos amis et le garder secret le plus longtemps possible !
</p>
</div>
</li> </li>
</ul> </ul>
</section>
<hr/>
<section id="deroulement-du-jeu">
<h2><FormattedMessage id="info.title.deroulement"/> :</h2>
<h4>
<u><FormattedMessage id="etape"/> 1</u> : <FormattedMessage id="info.deroulement.e1"/>
</h4>
<p>
<FormattedMessage id="info.deroulement.e1.text"/>
</p>
<h4>
<u><FormattedMessage id="etape"/> 2</u> : <FormattedMessage id="info.deroulement.e2"/>
</h4>
<p>
<FormattedMessage id="info.deroulement.e2.text"/>
</p>
<h4>
<u><FormattedMessage id="etape"/> 3</u> : <FormattedMessage id="info.deroulement.e3"/>
</h4>
<p>
<FormattedMessage id="info.deroulement.e3.text"/>
</p>
</section>
<hr/>
<section id="indice-possible">
<h2><FormattedMessage id="info.title.indice_possible"/> :</h2>
<br/>
<h4>
<FormattedMessage id="info.indice-possible.age"/>
</h4>
<IndiceList instance={AgeIndice} lang={locale}/>
<h2>Topographie</h2> <h4>
<p>Legende des différents objet disponible sur la carte.</p> <FormattedMessage id="info.indice-possible.hair"/>
</h4>
<IndiceList instance={ColorIndice} lang={locale}/>
<IndiceList instance={ColorEdgesIndice} lang={locale}/>
<hr/>
<h4>
<FormattedMessage id="info.indice-possible.sport"/>
</h4>
<IndiceList instance={SportIndice} lang={locale}/>
<IndiceList instance={NbSportIndice} lang={locale}/>
<h4>
<FormattedMessage id="info.indice-possible.voisin"/>
</h4>
<IndiceList instance={EdgesIndice} lang={locale}/>
<IndiceList instance={NbEdgesIndice} lang={locale}/>
<hr/>
</section>
</div> </div>
); );
} }

@ -49,3 +49,7 @@
form{ form{
margin : auto 150px; margin : auto 150px;
} }
.listContainer{
columns: 2 auto;
}

@ -3,7 +3,7 @@ const theme = {
colors: { colors: {
primary: '#0064E0', primary: '#0064E0',
secondary: '#0052B8', secondary: '#0052B8',
tertiary: '#7aa3f4', //* Pour les boutons de l'interface.
text: '#fff' text: '#fff'
//faire une gestion dark/light //faire une gestion dark/light

@ -62,5 +62,82 @@
"nb_sports_indice_end": "sport", "nb_sports_indice_end": "sport",
"sport_start": "The suspect plays at least", "sport_start": "The suspect plays at least",
"sport_end": "" "sport_end": "",
"informations" : "Information",
"info.intro.title":"Introduction to the game :",
"info.intro.text":"Welcome to our exciting deduction game, where intrigue and mischief come together in a thrilling adventure! Immerse yourself in a world of mystery and intrigue, where every interaction counts, and every clue brings you closer to the truth.Imagine a complex graph where each vertex represents a person, each axis a relationship, and every detail counts. You are plunged into a challenging challenge to discover who among these individuals is the mysterious killer. Each player has a crucial clue, and only the strategic sharing of these clues will lead you to solving the mystery. Explore our rules page to understand the intricacies of the game, discover clues that can guide you, and develop smart strategies to identify the culprit. Manipulate your friends to be the first to find out who the murderer is! Are you ready to take up the challenge and unmask the killer hidden in the graph? Let the investigation begin!",
"info.sommaire":"Contents",
"info.title.composant":"Game Components",
"info.title.objectif":"Objective of the game",
"info.title.deroulement":"Game flow",
"info.title.indice_possible":"Possible game clue",
"info.pions" : "Pawns",
"info.composant.text" : "Each player will be associated with a specific color that will distinguish the actions represented by the pawns as follows :",
"info.composant.carre.title":"square tokens",
"info.composant.carre":"These chips indicate a negation. When a player places a square token, it means that his clue clears the designated person.",
"info.composant.rond.title":"round tokens",
"info.composant.rond":"These chips represent a 'maybe'. The player depositing this token claims that the person is a suspect, but this does not guarantee his guilt.There is only one suspect carrying a round token for all players in the game, and this is the culprit!",
"info.car_perso":"Characteristics",
"info.composant.textcar":"In addition to their names, the characters are represented with other characteristics :",
"info.composant.age.title":"Ages",
"info.composant.age":"Each person has an age to authenticate them, varying between 0 and 60 years. Age is a characteristic that will be confirmed by clues in the form of ",
"info.composant.age.link":"age groups",
"info.composant.hair_col.title":"Hair's colors",
"info.composant.hair_col":"The characters also have a hair colour, which can be found in the following colours :",
"hair.blanc":"Blanc",
"hair.blond":"Blond",
"hair.roux":"Red head",
"hair.chatain":"Brown",
"hair.noir":"Black",
"info.composant.sport.title":"Sports",
"info.composant.sport":"The characters' hobbies are represented by five sports respectively :",
"info.composant.baseball":"Baseball",
"info.composant.basketball":"Basketball",
"info.composant.bowling":"Bowling",
"info.composant.football":"Football",
"info.composant.tennis":"Tennis",
"info.composant.sport.bis":"Among these sports, each character can have between 0 and 3 sports, which facilitates their identification using the clues you have.",
"info.objectif.intro":"Welcome to the clever universe of our deduction game, where deception and cunning are the keys to success. Your mission is to unravel the mystery behind each interaction of the complex graph representing the relationships between individuals.",
"info.objectif.t1":"Subtle Manipulation",
"info.objectif.t1.text":"The ultimate goal is to find out who among the individuals is the killer, but not through open collaboration. On the contrary, you will use subtle manipulation to blur the lines and distract your opponents. Ask strategic questions, respond with malice, and plant misleading clues to get closer to the outcome.",
"info.objectif.t2":"Trickery",
"info.objectif.t2.text":"Each round offers the opportunity to sow doubt among your opponents. When a player questions you, respond by cleverly placing a square token to indicate that 'depending on your clue, that person cannot be the culprit' or a round token to suggest that they remain in the suspect list. Be careful, because every gesture can be interpreted, and the truth is often hidden behind a facade of misleading clues.",
"info.objectif.t3":"Counter-manipulation",
"info.objectif.t3.text":"If a player places a square token, the questioner must also play his game by placing a square token of his color on a node of the graph. Countermanipulation becomes a formidable weapon to divert the accusation and sow confusion.",
"etape":"Step",
"info.deroulement.e1":"Ask Strategic Questions",
"info.deroulement.e1.text":"Each round begins with a player asking another player a question about a person on the graph. Answers are formulated by placing square or round tokens to indicate certainty or doubt as to the involvement of this person.",
"info.deroulement.e2":"Counterhandling and Counterquestioning",
"info.deroulement.e2.text":"If a player places a square token, the questioner must also place a square token on a node in the graph. Counter-questions are a way to confuse players and deflect the accusation.",
"info.deroulement.e3":"The Final Guess",
"info.deroulement.e3.text":"The game reaches its climax when a player attempts the final 'Guess', claiming that such a person is the killer. Other players can then contradict this statement by placing their own square chips. If no refutation is made, the player who made the 'Guess' wins the game, demonstrating his mastery in the art of manipulation.",
"info.indice-possible.age":"Person's age",
"info.indice-possible.hair":"Hair color of a person",
"info.indice-possible.sport":"Sport(s) of a person",
"info.indice-possible.voisin":"Character of neighbours"
} }

@ -61,5 +61,83 @@
"nb_sports_indice_end": "sport(s)", "nb_sports_indice_end": "sport(s)",
"sport_start": "Le suspect pratique au moins du", "sport_start": "Le suspect pratique au moins du",
"sport_end": "" "sport_end": "",
"informations" : "Informations",
"info.intro.title":"Introduction au jeu :",
"info.intro.text":"Bienvenue dans notre jeu de déduction captivant, où l'intrigue et la malice se rejoignent dans une aventure palpitante ! Plongez-vous dans un monde de mystère et d'intrigue, où chaque interaction compte, et chaque indice vous rapproche de la vérité.Imaginez un graphique complexe où chaque sommet représente une personne, chaque axe une relation, et chaque détail compte. Vous êtes plongé dans un défi stimulant pour découvrir qui parmi ces individus est le mystérieux tueur. Chaque joueur détient un indice crucial, et seul le partage stratégique de ces indices vous mènera à la résolution du mystère. Explorez notre page de règles pour comprendre les subtilités du jeu, découvrez les indices qui peuvent vous guider, et élaborez des stratégies intelligentes pour identifier le coupable. Manipuler vos amis, afin d'être le premier à découvrir qui est le meurtrier ! Êtes-vous prêt à relever le défi et à démasquer le tueur caché dans le graphe ? Que l'enquête commence !",
"info.sommaire":"Sommaire",
"info.title.composant":"Composants du jeu",
"info.title.objectif":"Objectif du jeu",
"info.title.deroulement":"Déroulement du jeu",
"info.title.indice_possible":"Indice possible du jeu",
"info.pions" : "Pions",
"info.composant.text" : "Chaque joueur sera associé à une couleur spécifique qui distinguera les actions représentées par les pions comme suit :",
"info.composant.carre.title":"Les jetons carrés",
"info.composant.carre":"Ces jetons indiquent une négation. Lorsqu'un joueur place un jeton carré, il signifie que son indice innocente la personne désignée.",
"info.composant.rond.title":"Les jetons ronds",
"info.composant.rond":"Ces jetons représentent un 'peut-être'. Le joueur déposant ce jeton affirme que la personne est un suspect, mais cela ne garantit pas sa culpabilité.Il y a un seul suspect portant un jeton rond pour tous les joueurs de la partie, et il s'agit du coupable ! ",
"info.car_perso":"Caractèristiques des personnages",
"info.composant.textcar":"En plus de leur nom, les personnages sont représentés avec d'autres caractéristiques :",
"info.composant.age.title":"Les Âges",
"info.composant.age":"Chaque personne possède un âge pour les authentifier, variant entre 0 et 60 ans. L'âge est une caractéristique qui sera confirmée par des indices sous forme de ",
"info.composant.age.link":"tranches d'âge",
"info.composant.hair_col.title":"Les Couleurs de cheveux",
"info.composant.hair_col":"Les personnages possèdent également une couleur de cheveux, que l'on retrouve parmi les couleurs suivantes :",
"hair.blanc":"Blanc",
"hair.blond":"Blond",
"hair.roux":"Roux",
"hair.chatain":"Châtain",
"hair.noir":"Noir",
"info.composant.sport.title":"Les Sports",
"info.composant.sport":"Les loisirs des personnages sont représentés par cinq sports respectivement :",
"info.composant.baseball":"Baseball",
"info.composant.basketball":"Basketball",
"info.composant.bowling":"Bowling",
"info.composant.football":"Football",
"info.composant.tennis":"Tennis",
"info.composant.sport.bis":"Parmi ces sports, chaque personnage peut avoir entre 0 et 3 sports, ce qui facilite leur identification à l'aide des indices que vous possédez.",
"info.objectif.intro":"Bienvenue dans l'univers astucieux de notre jeu de déduction, où la tromperie et la ruse sont les clés du succès. Votre mission est de démêler le mystère qui se cache derrière chaque interaction du graphique complexe représentant les relations entre les individus.",
"info.objectif.t1":"Manipulation Subtile",
"info.objectif.t1.text":"Le but ultime est de découvrir qui parmi les individus est le tueur, mais pas par une collaboration ouverte. Au contraire, vous utiliserez la manipulation subtile pour brouiller les pistes et détourner l'attention de vos adversaires. Posez des questions stratégiques, répondez avec malice, et plantez des indices trompeurs pour vous rapprocher du dénouement.",
"info.objectif.t2":"Jeu de Duperie",
"info.objectif.t2.text":"Chaque tour offre l'opportunité de semer le doute parmi vos adversaires. Lorsqu'un joueur vous interroge, répondez en plaçant habilement un jeton carré pour indiquer que 'selon votre indice, cette personne ne peut être le coupable' ou un jeton rond pour suggérer qu'elle reste dans la liste des suspects. Soyez prudent, car chaque geste peut être interprété, et la vérité est souvent cachée derrière une façade d'indices trompeurs.",
"info.objectif.t3":"Contre-manipulation",
"info.objectif.t3.text":"Si un joueur place un jeton carré, le questionneur doit également jouer son jeu en posant un jeton carré de sa couleur sur un nœud du graphique. La contre-manipulation devient une arme redoutable pour détourner l'accusation et semer la confusion.",
"etape":"Étape",
"info.deroulement.e1":"Poser des Questions Stratégiques",
"info.deroulement.e1.text":"Chaque tour commence par un joueur posant une question à un autre joueur concernant une personne sur le graphe. Les réponses sont formulées en plaçant des jetons carrés ou ronds pour indiquer la certitude ou le doute quant à l'implication de cette personne.",
"info.deroulement.e2":"Contre-manipulation et Contre-questions",
"info.deroulement.e2.text":"Si un joueur place un jeton carré, le questionneur doit également poser un jeton carré sur un nœud du graphique. Les contre-questions sont un moyen de semer la confusion parmi les joueurs et de détourner l'accusation.",
"info.deroulement.e3":"Le 'Guess' Final",
"info.deroulement.e3.text":"La partie atteint son apogée lorsqu'un joueur tente le 'Guess' final, affirmant que telle personne est le tueur. Les autres joueurs peuvent alors contredire cette affirmation en plaçant leurs propres jetons carrés. Si aucune réfutation n'est faite, le joueur ayant fait le 'Guess' remporte la partie, démontrant ainsi sa maîtrise dans l'art de la manipulation.",
"info.indice-possible.age":"Âge d'une personne",
"info.indice-possible.hair":"Couleur de cheveux d'une personne",
"info.indice-possible.sport":"Sport(s) d'une personne",
"info.indice-possible.voisin":"Caractèristique des voisins"
} }

@ -18,7 +18,9 @@ abstract class Indice {
abstract ToString(lang: string): string; abstract ToString(lang: string): string;
abstract toJSON(): any abstract toJSON(): any
} }
//todo to string ?
export default Indice export default Indice

@ -26,6 +26,7 @@ class NbEdgesIndice extends EdgesIndice {
nbNeighbors: this.nbNeighbors, nbNeighbors: this.nbNeighbors,
}; };
} }
} }
export default NbEdgesIndice export default NbEdgesIndice

@ -11,8 +11,8 @@ import Sport from "./Sport"
class Stub{ class Stub{
static GenerateIndice(): Indice[]{ static GenerateIndice(): Indice[]{
let indice = new NbEdgesIndice(1, 3) let indice = new NbEdgesIndice(1, 2)
let indice1 = new NbEdgesIndice(2, 4) let indice1 = new NbEdgesIndice(2, 3)
let ageIndice = new AgeIndice(3, 0, 14) let ageIndice = new AgeIndice(3, 0, 14)
let ageIndice1 = new AgeIndice(4, 15, 19) let ageIndice1 = new AgeIndice(4, 15, 19)
let ageIndice2 = new AgeIndice(5, 20, 29) let ageIndice2 = new AgeIndice(5, 20, 29)
@ -41,11 +41,13 @@ class Stub{
} }
} }
//* Voisin couleur
for (let i: Color=0; i<5; i++){ for (let i: Color=0; i<5; i++){
indices.push(new ColorEdgesIndice(test, [i])) indices.push(new ColorEdgesIndice(test, [i]))
test++ test++
} }
//* Nombre de sport
for (let i=1; i<3; i++){ for (let i=1; i<3; i++){
indices.push(new NbSportIndice(test, i)) indices.push(new NbSportIndice(test, i))
test++ test++

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save