siit-webdev-47 / treasure-hunt-game

1 stars 0 forks source link

Implement player component #4

Closed Adrian-Moldovan closed 4 months ago

Adrian-Moldovan commented 4 months ago

Player should have

  1. A name
  2. An avatar (image)
  3. An value for the energy level.
  4. The starting energy value should be a random number between 25-75

Implement the player component

  1. Display the name
  2. Display the avatar
  3. Display the energy value
  4. The displayed energy value should use different colors (green above 50, yellow between 25-50, red below 25 )

Re-render the component once the energy value is changed

  1. Implement useState to re-render the component if the energy value changes
Adrian-Moldovan commented 4 months ago
Adrian-Moldovan commented 4 months ago

Code review