abacha/s10-mod — Issue #13: Issues with Board
Author: sandal
Created: 2012-01-22 02:58:04+00:00
State: open

1) This should be in a namespace, i.e. the file should be in _lib/risk_calculator/board.rb_, and the class name should be wrapped in a module like:

```ruby
module RiskCalculator
class Board
end
end
```

The details about this are in the [s10-notes about code structure](https://github.com/mendicant-university/s10-notes/blob/master/code_structure.md)

2) `Board#read_board_file` should be lifted up into `Board.from_file`

I provided an outline of how to do this in [this gist](https://gist.github.com/1654996). The benefit of moving your file processing logic to a class level factory method is that it makes it so that your `Board` object is not so tightly coupled to a single file-based representation. This will make testing as well as using board objects in a different context much, much easier.