Refactor - extract functions

* is_spare
* score_spare
* score_normal