Skip to content

About

My first game

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

58 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project - React Game

Tech Stack

  • React (functional components + hooks)
  • JavaScript
  • CSS (custom styling)

Heads or Tails

A simple and fun coin-flip game built with React. Test your luck by guessing Heads or Tails and see if you can build a winning streak!

HOW TO PLAY

The game displays a coin and asks: "Your move: heads or tails?"

Live Demo

You can also play directly from GitHub.

Choose either:

  • Heads → click the Heads button
  • Tails → click the Tails button

The coin will flip randomly:

  • ✅ If your guess matches the result, you’ll see a winning message (e.g., "You win!!" or "Boom! You crushed it!").
  • ❌ If your guess is wrong, you’ll see a losing message (e.g., "Flip again!" or "Not this time...").

Stats are tracked automatically:

  • Total flips: how many times you’ve played
  • Total wins: how many correct guesses you’ve made
  • Win streak: how many consecutive wins you’ve achieved

Features

  1. Randomized coin flips with Heads and Tails images.
  2. Fun and varied win/lose messages to keep the game engaging.
  3. Real-time tracking of flips, wins, and streaks.
  4. Simple, interactive UI built with React hooks (useState).

Deploy to GitHub Pages

npm run deploy

image attribution

George Washington Presidential Silver Medal © 2025 United States Mint, U.S. Department of Treasury. All rights reserved.

About

My first game

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages