An honest question here but can guarantee it has varying answers from a wide range of people with different experience and preference.
I have a little game project I have been messing around with and I have most things neatish and maintainable however I have this one damn class called WorldRenderer and it is HORRIBLE.
It holds all my cameras and backgrounds for the game, so if I wanted to (which I do) add some menus I would need to not use this class unless I create a state system and only runs certain parts of the render code depending on the games state. Which will make the class look WORSE.
Here it is for you to laugh at : https://bitbucket.org/Gibbo/falling-rocks/src/841b4e29ad5e7ac8800a484a778f10161a04cf21/FallingRocks/src/com/gibbo/fallingrocks/engine/WorldRenderer.java?at=master
So yeah, how do you determine a good time to re-factor working but horrible looking code?