It sounds like it might be the kind of thing you are after.
This seems like a reasonable solution, although I'm concerned it might introduce more complexity – Tomas Cokis Dec 2 '11 at 15:14.
There is no generally accepted way in this case. However, common practice in any programming scenario is to remove duplicated code. I think you're getting stuck on how to divide code by direction, when direction changes the outcome too much to make this division.In these cases, focus on the common portions of the three algorithms and divide them into tasks.
I did something similar when I duplicated WinForms flow layout control for MFC. I dealt with two types of objects: fixed positional (your pictures etc.) and auto positional (your words). In the example you provided I can list out common portions of your example.
Write Line (direction) bool TestPlaceWord (direction) // returns false if it cannot place word next to previous word bool WrapPastObject (direction) // returns false if it runs out of line bool WrapLine (direction) // returns false if it runs out of space for new line. Each of these would be performed no matter what direction you are faced with. Ultimately, the algorithm for each direction is just too different to simplify anymore than that.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.