Giter VIP home page Giter VIP logo

ro_sham_bo's Introduction

ro_sham_bo's People

Contributors

evanthegrayt avatar

Stargazers

 avatar

Watchers

 avatar

ro_sham_bo's Issues

Add an option to cheat

Just for fun. Make it so either player can always win. Make it "play fair" until the to-be loser gets enough points to almost win. Then sweep the rest of the round. This will make it still seem random.

Make into a gem

Installation should just require gem install rock-paper-scissors or something.

Fix cheat test

The cheating isn't actually being tested properly. This...

    game = RoShamBo.new(cheater: :user)
    50.times do
      game.play(:rock) until game.over?
      assert_equal(:user, game.winner)
    end

...should be...

    50.times do
      game = RoShamBo.new(cheater: :user)
      game.play(:rock) until game.over?
      assert_equal(:user, game.winner)
    end

Pretty-up output

Make the output look better. Maybe add some color to make the score more visible.

Refactor, more object oriented

This could use more objects. I think Rules and Score could be their own class. The bin/ro_sham_bo executable should also be extracted to a class so we can test it.

Also, the only thing you can do is play the game via the command line; the API doesn't play the game. You should be able to play the game via CLI, or a ruby console, via RoShamBo.play.

Add CI

After #6, add CI that ensures tests are passing.

update readme

Make the readme more complete. Installation instructions, etc.

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.