Skip to content

adamddurrant/tug-of-war

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tug of War Game

Overview

This is a simple Tug of War game built using React Native. The game consists of two players competing against each other by tapping on their respective halves of the screen. The goal is to reduce the opponent's side to a height of 20 or less. The game features a flashing animation when a player taps, and a winner is declared when one side wins. The game can be reset to play again.

Features

  • Two-player gameplay (top vs. bottom).
  • Flashing animation on tap.
  • Dynamic color transitions for visual feedback.
  • Reset button to restart the game.

Screenshot

screenshot

Prerequisites

Before running the app, ensure you have the following installed:

How to Run the App Locally

Step 1: Clone the Repository

Clone this repository to your local machine using the following command:

git clone https://github.com/your-username/tug-of-war-game.git
cd tug-of-war-game

Step 2: Install Dependencies

Install the required dependencies using npm or Yarn:

npm install
# or
yarn install

Step 3: Run the App

Start the development server and run the app on an emulator or physical device.

For React Native CLI:

npx react-native run-android
# or
npx react-native run-ios

For Expo CLI:

expo start

Then scan the QR code with the Expo Go app on your mobile device.

Dependencies

The app uses the following dependencies:

  • react: Core library for building the UI.

  • react-native: Framework for building native apps using React.

  • react-native-reanimated (if applicable): For smooth animations.

How to Play

  • The screen is divided into two halves: top and bottom.

  • Each player taps rapidly on their respective half to increase their side's height and decrease the opponent's.

  • The game ends when one side's height is reduced to 20 or less.

  • A winner is declared, and the game can be reset using the "Play Again" button.

About

This is a simple Tug of War game built using React Native. The game consists of two players competing against each other by tapping on their respective halves of the screen.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors