Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coin-Collection-Game

Play Project Is Live On Following Link: https://chetax.github.io/Greddy-Aproach-And-Coin-Collection/

⭐ If You Like Than Just Give Star 😉

Screenshot 2023-11-04 171540

Introduction

This is a simple two-player coin game where players take turns selecting coins from either end of a list of 12 coins. The game continues until there are no more coins left. The player with the maximum number of coins at the end wins.

How to Play

  1. Start the game with a list of 12 coins, numbered from 1 to 12.

  2. Players take turns to make a move:

    • Player 1 selects a coin from either the first or last position in the list. The selected coin is added to their credit, and the coin is removed from the list.
    • Player 2 follows the same rules and makes their selection.
  3. The game continues until there are no more coins left in the list.

  4. After the last coin has been picked, the player with the highest credit wins the game.

Rules

  • Players can only choose coins from the first or last position of the list.
  • The selected coin is added to the player's credit.
  • The first and last coins are removed from the list after each selection.
  • The game continues until all 12 coins have been chosen.
  • The player with the most coins in their credit at the end is the winner.

Example

Here's an example of how the game might progress:

  • Initial List: [15, 12, 43, 84, 55, 36, 67, 98, 19, 20, 51, 72]

    • Player 1 chooses the coin at the last position 12 with maximum value (72).
    • List after Player 1's move: [ 12, 43, 84, 55, 36, 67, 98, 19, 20, 51]
    • Player 2 chooses the coin at the first position (2).
    • List after Player 2's move: [ 43, 84, 55, 36, 67, 98, 19, 20]
    • ...

ScreenShot :

Screenshot 2023-11-04 121758
Screenshot 2023-11-04 121803 Screenshot 2023-11-04 121818 Screenshot 2023-11-04 121823 Screenshot 2023-11-04 121829 Screenshot 2023-11-04 121833 Screenshot 2023-11-04 121838 Screenshot 2023-11-04 121842

Winning

The player with the highest credit at the end of the game is declared the winner.

How to Run

To run the program, follow these steps:

  1. Clone the repository to your local machine.

  2. Execute the main program file (e.g., start.html).

  3. Follow the on-screen instructions to take turns and play the game.

Contribution

If you'd like to contribute to this project, please feel free to fork the repository and submit a pull request with your improvements.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Feel free to adapt this template to fit your project's specific details and structure. Markdown language is highly versatile and can be customized as needed.

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages