Rock Paper Scissor Discord
Create a New Game
Users can initiate a new Rock-Paper-Scissors game with the following parameters:
/rps new <player(s)> <amount> <token> <rounds>
<player(s)>
:- Tag Discord users to specifically invite them to the game. Only tagged users can participate.
- number of users If a number is provided, it specifies the maximum number of players.
<amount>
: The amount to bet.<token>
: The type of token to bet (e.g., icy, BTC, ETH).<rounds>
: Specifies the number of rounds in the game.
For example:
/rps new @alice @bob 5 icy 3
OR
/rps new 4 5 icy 3
The game will wait for all players to accept the bet
π New Rock-Paper-Scissors Game! π
Host: @host_username
Type: `/rps new @player1 @player2 5 icy 3` to start the game!
π€ Players: Waiting for confirmation...
π° Bet Amount: 5 icy
π Rounds: 3
π New Rock-Paper-Scissors Game! π
When you're ready, just hit the "Start" button.
Otherwise, we'll wait until there are enough players ready to join.
Start the Game
Once all players accept the bet and the host starts the game, the bot will automatically run through the specified number of rounds (defaults to 3 if not specified).
Game Mechanics
After each round, the bot will automatically calculate points for each pair of players. The point for each user is the sum of point when the user won in the pairs, point when the user lost, point when the user tie:
- Win: 2 points
- Tie: 1 point
- Loss: 0 points
Rock Paper Scissor Rule
- Rock > Scissor
- Scissor > Paper
- Paper > Rock
Stimulated Example:
Players: A, B, C
Number of rounds: 3
Bet amount: 10 icy each, total pool: 30 icy
Round 1:
- A chooses ROCK
- B chooses PAPER
- C chooses PAPER
Points after Round 1:
A: 0
B: 2
C: 2
(A lost B and C, C tied with B and won A, B tied with C and won A)
Round 2:
- A chooses ROCK
- B chooses ROCK
- C chooses PAPER
Points after Round 2:
- A: 1 (Tied with B)
- B: 3 (Tied with A, but beat C in Round 1)
- C: 4 (Won both rounds)
Round 3:
- A chooses PAPER
- B chooses ROCK
- C chooses SCISSORS
Points after Round 3:
- A: 3 (Won this round)
- B: 3
- C: 4
End Game and Distribution
After all rounds, the bot will summarize the points and distribute the winnings among players, proportional to their point totals.
For example:
Total icy deposited: 30 icy
Bot fee: 2% (0.6 icy)
Amount for distribution: 29.4 icy
Distribution based on points:
- A: 3 points
- B: 3 points
- C: 4 points
Total points: 10 points
- A receives: ( \frac{3}{10} \times 29.4 = 8.82 ) icy
- B receives: ( \frac{3}{10} \times 29.4 = 8.82 ) icy
- C receives: ( \frac{4}{10} \times 29.4 = 11.76 ) icy
5/ Interface
Start the game
*Note: The host is also the 1st player
This UI inclues a button: βJoinβ
π Rock-Paper-Scissor! π
π€ Players: @player1, @player2
π° Bet Amount: 5 icy each
π Rounds: 3
Get ready for Round 1! π₯
- Notifications for users to join the games
Join the Rock-Paper-Scissor!
@username has invited you to join the games with:
π€ Current Players: @player1, @player2
π° Bet Amount: 5 icy each
π Rounds: 3
Press Accept to join!
Button: Accept, Reject
3.Notification to choose the Rock-Paper-Scissor
3 button to choose
Pick Rock-Paper-Scissor!
πͺ¨ Rock
π Paper
βοΈ Scissor
- Result for each rounds
After all users picked, send the summary into the thread where the game start.
ποΈ End of Round 1! ποΈ
- @player1 chose ROCK πͺ¨
- @player2 chose PAPER π
- @player3 chose PAPER π
π Points after Round 1:
- @player1: 0 points π©
- @player2: 3 points π
- @player3: 3 points π
Ready for Round 2? π₯
- Game end
After all rounds, send the summary into the thread where the game start
π Game Over! π
π Final Points:
- @player1: 3 points π
- @player2: 3 points π
- @player3: 4 points ππ
π° Winnings Distribution π°:
- @player1: 8.82 icy π
- @player2: 8.82 icy π
- @player3: 11.76 icy π₯³
Thank you for playing! π
- Users receive the result through DM
π Congratulations!
You've won <winning_amount> <token>! π₯³