Giter VIP home page Giter VIP logo

january-2019-code-golf's Introduction

Welcome to the LRUG January Ruby Golf Competition!

The idea in golf is to score as low as possible. In Ruby Golf, that means using as few characters as possible. There are a number of different challenges, or "holes" to continue the golf metaphor; you don't need to tackle them all, just do what you can.

It'll probably be more fun to work in teams -- this is a great opportunity to meet some new people and pick up some new Ruby tricks.

Since you'll need to use the method parameters in your implementation, we've kept them as short as possible, so as not to waste any precious characters for you :-)

Get started

In this repository, you should care about two files: golf.rb and golf_test.rb. In the former, you write your short implementations. The latter contains tests to make sure that your implementations work, and also some helper code to count how many characters you've used.

To get started, take a look at the tests in golf_test.rb for "Hole 1", and then start writing your implementation in the Golf.hole1 method implementation.

You don't need to attempt all of the holes; if you're stuck or not having fun, just try a different one!

Scoring

When we calculate your score, we will strip out comments and blank lines, and the 'def' and 'end' lines of the method, but leave everything else. So, to try out different solutions, just comment out your original one and try a new one underneath in the same method body

To check your score, simply run the tests using rake.

The first time you run this, you'll be prompted for a team name, so we can track your scores against everyone else playing.

Some basic rules

  • Any version of Ruby that runs the tests is allowed
  • Everything in the Ruby Standard Library can be used
  • No gems can be used
  • Code can't be hidden outside of the hole<x> methods

Troubleshooting

If you don't think the scoring is working, run with the --debug flag to see some more information about how we are counting your characters. To avoid breaking this please ensure the last line of your method is "end # Hole x" - don't remove that comment!

january-2019-code-golf's People

Contributors

lazyatom avatar

Stargazers

 avatar  avatar

Watchers

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