Open VncPsq opened 4 months ago
`Step 2 : Afficher les personnages dans le combat
UseStates : Game --> string --> notStarted /finished / aborder / inProgress --> initial : noStarted Round --> int --> 1, 2, 3 : init 0
import { useState } from 'react' const games = { status: 'noStarted', currentRound: 0, player: { name : "Harry Potter", img : "https", health : 100, remainingSpells : { protego : true, confringo : true, stupeflix : true, slugulusEructo : true, }, }, computer: { name : "Draco Malfoy", img : "https", health : 100, remainingSpells : { protego : true, confringo : true, stupeflix : true, slugulusEructo : true, }, }, };
UseEffects : Chaque changement de currentRound Chaque changement de game `
`Step 2 : Afficher les personnages dans le combat
UseStates : Game --> string --> notStarted /finished / aborder / inProgress --> initial : noStarted Round --> int --> 1, 2, 3 : init 0
import { useState } from 'react' const games = { status: 'noStarted', currentRound: 0, player: { name : "Harry Potter", img : "https", health : 100, remainingSpells : { protego : true, confringo : true, stupeflix : true, slugulusEructo : true, }, }, computer: { name : "Draco Malfoy", img : "https", health : 100, remainingSpells : { protego : true, confringo : true, stupeflix : true, slugulusEructo : true, }, }, };
UseEffects : Chaque changement de currentRound Chaque changement de game `