Skip to content

abhishek-0713/UNO-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

swiggy-assignment - UNO Game

Swiggy Round 1 coding test

How to run the application:

  1. Download and install an IDE such as Eclipse or IntelliJ IDEA.
  2. Clone or download the project from the source repository.
  3. Open the IDE and import the project into the workspace.
  4. Resolve any project dependencies and ensure that the JDK is installed and configured.
  5. Open the main class, which is likely to be called Main .
  6. Right-click on the main class and select "Run as" > "Java Application" from the context menu.
  7. The application should start running, and you can interact with it from the console or user interface, depending on how the application is designed.

Clone Here:

https://github.com/abhishek-0713/UNO-Game.git

Tutorial: How to Play the Game

--------------------------- Welcome to UNO! ---------------------------

Before we begin, let's go through a quick tutorial to get you started.

  • To play a card, simply type the card you want to play. For example, if you have a blue 5, type 'b5' to play it.

  • If you don't have a playable card in your hand, you can draw from the deck by typing 'draw'.

  • Keep an eye on the top card in the discard pile. You can only play a card if it matches either the color or the number of the top card.

  • Remember, special action cards can change the game. A 'skip' card skips the next player's turn, a 'reverse' card changes the direction of play, and a 'draw two' card makes the next player draw two cards.

  • Pay attention to the color-changing wild cards! You can play a wild card on any color, and a wild draw four card forces the next player to draw four cards.

  • Don't worry if you need a refresher during the game. Just type 'help' to see this tutorial again.

Are you ready to have some fun? Let's start playing UNO!

------------------------- Thank You ---------------------------

Sample Play:


 ██╗░░░██╗███╗░░██╗░█████╗░  ░██████╗░░█████╗░███╗░░░███╗███████╗
 ██║░░░██║████╗░██║██╔══██╗  ██╔════╝░██╔══██╗████╗░████║██╔════╝
 ██║░░░██║██╔██╗██║██║░░██║  ██║░░██╗░███████║██╔████╔██║█████╗░░
 ██║░░░██║██║╚████║██║░░██║  ██║░░╚██╗██╔══██║██║╚██╔╝██║██╔══╝░░
 ╚██████╔╝██║░╚███║╚█████╔╝  ╚██████╔╝██║░░██║██║░╚═╝░██║███████╗
 ░╚═════╝░╚═╝░░╚══╝░╚════╝░  ░╚═════╝░╚═╝░░╚═╝╚═╝░░░░░╚═╝╚══════╝



--------------------------- Welcome to UNO! ---------------------------
Before we begin, let's go through a quick tutorial to get you started.

To play a card, simply type the card you want to play. For example, if you have a blue 5, type 'b5' to play it.

If you don't have a playable card in your hand, you can draw from the deck by typing 'draw'.

Keep an eye on the top card in the discard pile. You can only play a card if it matches either the color or the number of the top card.

Remember, special action cards can change the game. A 'skip' card skips the next player's turn, a 'reverse' card changes the direction of play, and a 'draw two' card makes the next player draw two cards.

Pay attention to the color-changing wild cards! You can play a wild card on any color, and a wild draw four card forces the next player to draw four cards.

Don't worry if you need a refresher during the game. Just type 'help' to see this tutorial again.

Are you ready to have some fun? Let's start playing UNO!

------------------------- Thank You ---------------------------

Choose computer opponents you want to play with [1-7]: 1
Choose Number of cards you want to start with [ Recommended 7 ]: 7
Unboxing playing deck...
Shuffling playing deck...
Dealing out playing deck...

It is Your Turn!
The cards in your hand are: gx b5 b+2 y4 b1 g4 y6 
The top of the Discard Pile is a r1 card
Play a card: b1
You played a b1 card


It is Player 2's Turn!
The cards in player 2's hand are: u u u u u u u 
The top of the Discard Pile is a b1 card
Playing a card....
Played a b6 card


It is Your Turn!
The cards in your hand are: gx b5 b+2 y4 g4 y6 
The top of the Discard Pile is a b6 card
Play a card: b+2
You played a b+2 card

 Player number 2 got skipped!


It is Your Turn!
The cards in your hand are: gx b5 y4 g4 y6 
The top of the Discard Pile is a b+2 card
Play a card: b5
You played a b5 card


It is Player 2's Turn!
The cards in player 2's hand are: u u u u u u u u 
The top of the Discard Pile is a b5 card
Playing a card....
Played a y5 card


It is Your Turn!
The cards in your hand are: gx y4 g4 y6 
The top of the Discard Pile is a y5 card
Play a card: y6
You played a y6 card


It is Player 2's Turn!
The cards in player 2's hand are: u u u u u u u 
The top of the Discard Pile is a y6 card
Playing a card....
Played a y5 card


It is Your Turn!
The cards in your hand are: gx y4 g4 
The top of the Discard Pile is a y5 card
Play a card: y4
You played a y4 card


It is Player 2's Turn!
The cards in player 2's hand are: u u u u u u 
The top of the Discard Pile is a y4 card
Playing a card....
Played a g4 card


It is Your Turn!
The cards in your hand are: gx g4 
The top of the Discard Pile is a g4 card
Play a card: g4
You played a g4 card
UNO!

It is Player 2's Turn!
The cards in player 2's hand are: u u u u u 
The top of the Discard Pile is a g4 card
Playing a card....
Played a g2 card


It is Your Turn!
The cards in your hand are: gx 
The top of the Discard Pile is a g2 card
Play a card: gx
You played a gx card
players 1 wins!

  Great Game!!!!



Releases

No releases published

Packages

No packages published

Languages