Don't lust... don't think with lustful intent (hmmm intent
that is what is needed in many crimes)... don't covet someone else's woman... keep your thoughts about women (who are not your wife) clean... if you are married don't fantasize about jumping some other woman's bones... etc.
The buddhists call it Right thought
.... and Right action
Flawed thinking leads to flawed action / flawed action follows flawed thinking...
If you not thinking (with intent) about committing adultery with your neighbor's wife (or any woman), then the action of you committing adultery is not likely... unless you are drunk... but then you aren't thinking "right" any more... etc.
Pretty simple stuff when you think about it.
awww If you saw my neighbor's you could not help but do at least a little coveting.