Skip to content

The Dice Roller App is a simple yet interactive game that allows two players to roll a virtual dice and compete to see who reaches the target score first. The game keeps track of each player's score and determines a winner when one player reaches or exceeds 20 points.

Notifications You must be signed in to change notification settings

Shrikant2801/DiceRoller

Repository files navigation

Dice Roller App

Description

The Dice Roller App is a fun and simple two-player game where players take turns rolling a virtual dice. The goal is to be the first player to reach 20 points or more. The app is built using Jetpack Compose, making use of modern UI components for a clean and interactive user experience. Once a player wins, the option to restart the game becomes available.

Features

  • Two-Player Gameplay: Each player takes turns rolling the dice.
  • Turn Indicator: Shows whose turn it is to roll the dice.
  • Winning Condition: First player to reach 20 points wins.
  • Dice Image: Displays a virtual dice image that changes based on the roll.
  • Restart Button: Becomes visible only after a player wins the game.
  • Simple and Attractive UI: Built using Jetpack Compose for a modern and responsive look.

How to Play

  1. Player 1 and Player 2 take turns pressing their respective buttons.
  2. A random number between 1 and 6 is generated and displayed as a dice image.
  3. The score is updated based on the dice roll.
  4. The first player to reach or exceed 20 points is declared the winner.
  5. After the game ends, a "Restart Game" button appears to start a new game.

Technologies Used

  • Kotlin
  • Jetpack Compose (for UI)
  • Android Studio

Screenshots

Screenshot 2024-10-03 085629 Screenshot 2024-10-03 085712 Screenshot 2024-10-03 085750

About

The Dice Roller App is a simple yet interactive game that allows two players to roll a virtual dice and compete to see who reaches the target score first. The game keeps track of each player's score and determines a winner when one player reaches or exceeds 20 points.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages