Git Product home page Git Product logo

ball-clock's Introduction

Ball-Clock Simulator

To use the ball clock simulator, simply run the ball-clock command line so:

Getting Set Up

Make sure you have permissions to run ball-clock, the shell script:

chmod +x ball-clock

Mode 1 (Cycle Days)

./ball-clock 30

will produce

30 balls cycle after 15 days. Completed in 112 milliseconds (0.112 seconds)

Mode 2 (Clock State)

./ball-clock 30 325

will produce

{"Min":[],"FiveMin":[22,13,25,3,7],"Hour":[6,12,17,4,15],"Main":[11,5,26,18,2,30,19,8,24,10,29,20,16,21,28,1,23,14,27,9]} Completed in 74 milliseconds (0.074 seconds)

Additional Parameters

--pretty - Pretty Print

Running either mode using the --pretty flag before the numeric arguments will result in the output being moderately more user-friendly.

./ball-clock --pretty 30

will result in a color-coded output

--verbose - Verbose Output

Running with this flag before the numeric arguments will result in the machine's state being output after each state change

./ball-clock --verbose --pretty 30

--balls, --runtime - Balls and Runtime

These flags take precedence over the command-line overflow:

./ball-clock --balls 30 --runtime 325 --pretty

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.