Perhaps build a 2d view representing pieces already places. eg. (o's represent empty spots, x's represent placed pieces)
|ooooo|
|oooox|
|ooxxx|
|xxxxx|
Look at your piece and its current position. Simulate moving it to the spot it needs to go, then check if any of the x/y co-ordinates overlap. If so, then it can't move there.
eg. if you've got a piece (represented by y) moving down in the following
4|ooooo|
3|yyyox|
2|ooxxx|
1|xxxxx|
12345
Simulate yyy moving down one spot. It then occupies (1,2), (2,2) and (3,2). Check your representation - 3,2 is occupied and so the block can't move there. This logic should (I think) apply to any shape piece on any placed board.