There was a game I played once, played on a chess board. You have 8 rooks, and in order to remove pieces, you had to surround it. Here's an example. * is one side and # is the other:
Anyway, I've sorted out the movement of the pieces (in programming), but when you select a piece, I would like a shape (taking up one square) on the X or Y axis if the X,Y coordinates of the mouse are closer to the axis.
It's hard to explain, but if the mouse is closer to the Y axis, the shape would snap to the Y axis, and if the mouse moves closer to the X axis (than it is to the Y axis) it should snap there.
You 'COULD' have a look at the game I have so far, but if you don't like reading uncommented and 1-space-nesting programs, you shouldn't really. The reason why it is called Granddad's Game is because the game is for him... You also might find a lot of one-line functions but that's because it looks nicer (I'm Mr. Cosmetic).