Moving the core of guess the number to a library script