bowling-scorer
bowling-scorer
Solution to the bowling scorer problem on reddit found here.
Gave me an excuse to write a lexer/parser.
Installation
Add it to your shard.yml:
dependencies:
bowling-scorer:
github: amedeiros/bowling-scorer
version: ~> 0.1.0
$ crystal deps
Usage
# Run the games from the reddit challenge.
crystal src/play.cr
# Or require the library and play your own.
require 'bowling-scorer'
BowlingScorer::Game.play("X-/X5-8/9-X811-4/X")
# Or use the lexer/parser
lexer = BowlingScorer::Lexer.new("X-/X5-8/9-X811-4/X")
parser = BowlingScorer::Parser.new(lexer)
parser.parse
Development
$ crystal spec
$ crystal tool format
Contributing
- Fork it ( https://github.com/amedeiros/bowling-scorer/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- amedeiros Andrew Medeiros - creator, maintainer
Repository
bowling-scorer
Owner
Statistic
- 1
- 0
- 0
- 0
- 0
- about 8 years ago
- September 6, 2016
License
MIT License
Links
Synced at
Thu, 07 Nov 2024 02:47:59 GMT
Languages