Code Monkey home page Code Monkey logo

paperrockscissors's Introduction

Paper Rock Scissors

CircleCI

Implemented in Rust, to make it interesting, I'm not a total Rust master, but I manage, and learned some stuff on the way. Pretty happy with how it turned out, Rust has an amazingly powerful type system.

I've documented most of the public entities, but it is meant for starting discussions.

To build:

cargo build

To test:

cargo test

To run some benchmarks:

cargo bench

To see the docs:

cargo doc --open

Paper Rock Scissors Exercise

The following is a small exercise to get an idea of your coding and design skills. We would like you to develop a simple interactive game of Paper Rock Scissors

It's intentionally not an algorithmically complex problem, so we're looking more at modelling and structure. We are trying to get a feel for how you code in a professional setting.

Functional Requirements

  • The user is presented with a CLI to play the game.
  • A user can enter one of 3 inputs: paper, rock or scissors.
  • The computer will choose one input at random.
  • The game rules will be applied and a winner is chosen:
    • Paper beats Rock
    • Rock beats Scissors
    • Scissors beats Paper.
    • The same input is a tie.
  • The game will repeat until the user explictly chooses to exit.
  • On exit a summary is displayed of games won, lost, and tied.

Non-Functional Requirements

  • Create a branch of this repo and submit your solution as a PR.
  • You can use any language you like, but we'd like to see your object oriented design skills, so best to use a language supporting OO.
  • Write your code to the same standard you would professionally (object structure, design patterns, readability, testing/testability, extensibility)
  • Write some unit tests for the key pieces of logic.
  • Don't go overboard, this should only take a few hours.

paperrockscissors's People

Contributors

pauldwolfe 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.