Giter Site home page Giter Site logo

santhu195 / cleanstrike Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 15 KB

A new game in carrom-board called Clean Strike is played by 2 players with multiple turns. A turn has a player attempting to strike a coin with the striker. Players alternate in taking turns.

Python 100.00%

cleanstrike's Introduction

CleanStrike

A new game in carrom-board called Clean Strike is played by 2 players with multiple turns. A turn has a player attempting to strike a coin with the striker. Players alternate in taking turns.

The game is described as follows:

There are 9 black coins, a red coin and a striker on the carrom-board Strike - When a player pockets a coin he/she wins a point .
Multi-strike - When a player pockets more than one coin he/she wins 2 points. All, but 2 coins, that were pocketed, get back on to the carrom-board .
Red strike - When a player pockets red coin he/she wins 3 points. If other coins are pocketed along with red coin in the same turn, other coins get back on to the carrom-board .
Striker strike - When a player pockets the striker he/she loses a point .
Defunct coin - When a coin is thrown out of the carrom-board, due to a strike, the player loses 2 points, and the coin goes out of play .
When a player does not pocket a coin for 3 successive turns he/she loses a point .
When a player fouls 3 times (a foul is a turn where a player loses, at least, 1 point), he/she loses an additional point .
A game is won by the first player to have won at least 5 points, in total, and, at least, 3 points more than the opponent .
When the coins are exhausted on the board, if the highest scorer is not leading by, at least, 3 points or does not have a minimum of 5 points, the game is considered a draw .
Write a program that takes in the outcome of each turn as input and outputs the result of the game as and when applicable along with necessary statistics that supports the result .

Running the Code:

  1. git clone https://github.com/Santhu195/CleanTrike.git

  2. cd cleanStrike/python3 main.py

cleanstrike's People

Contributors

santhu195 avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.