I'm working a simple Blackjack game for the CLI. While it works, I am having trouble refactoring it and was wondering if anyone could give me some advice as to what parts of the program look bulky and could be slimmed down. Any help would be appreciated. You can find it here.
Tell me more
×
Code Review Stack Exchange is a question and answer site for
peer programmer code reviews. It's 100% free, no registration required.
|
closed as off topic by palacsint, Michael K Jul 31 '12 at 13:52
Questions on Code Review Stack Exchange are expected to relate to code review request within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.
It will be better, if you post some of code examples here. https://github.com/latinforadapt/blackjack/blob/master/deck.rb 1) Where is line breaks? Please, separate your methods by line breaks, it will increase your code readability. 2)
Use CONSTANTS for values which will not change. 3)
What sux, all of this staff should be placed in initialize method. Or it should me memoizable. 4)
Why you use global variable? :) This should be in class level method. |
|||
|