split code to relevant file
split code to relevant file
exiting recursion gracefully.
Game ending works for good
test