Giter VIP home page Giter VIP logo

spoof-game's Introduction

Spoof Game Problem

Spoof is a game played to establish who buys the next round in a pub (the looser pays for all).

Each player draws some number of coins between zero and three and holds them concealed. The game proceeds in rounds: in a round each player guesses the total number of coins contained in all the players’ hands. A player acts as the initiator and starts the guessing process that proceeds clockwise until all players have guessed a number that hasn’t previously been taken. After the guesses all players reveal their coins, the total is calculated and the player who choose the closest number wins the round and exists the game. The others will play more rounds until only one player is left. This player is who buys the drinks. Every time a round is played the first player to guess a number rotates clockwise to the next available player.

Requirements

It has been tested on Ubuntu 20.10, but should work on any OS with installed Go.

Installation

  1. Get the code from GitHub or directly clone it from the git repository:
git clone https://github.com/rpizziol/spoof-game.git
  1. Eventually change the game variables in the header of the spoof.go file (totalNumberOfPlayers, maxCoins and minCoins).

Usage

  1. Make sure you are in the project directory with no other file but the ones obtained through the git repository

  2. Run the Go project (go run .)

Authors

  • Roberto Pizziol - Spoof Game - rpizziol

spoof-game's People

Contributors

rpizziol avatar

Stargazers

 avatar

Watchers

 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.