So I'm making a more simple/basic version of Checks.
The only thing I want to achieve is the following: I want an object to check if there's an object in front of it OR in front of it on either the left/right side OR at the edge of the world, if not, the object can move.
Code I use: Arrays: 4 arrays for each row, every check has a number.
The 'Witteschijf' and 'Zwarteschijf' are the black and white checks on either side of the board.
Here's an image: this will clearify a lot, I think.
No possibility:
Possibilities to move

So with some symbols (x is the given object, o are the other objects)
If this scenario would happen:
ooo
x
=> x turns red. Because he can't move any way (left and right and bottom are NOT included.
If this would happen:
oo|
x
(| is the edge): x'd also turn red. because it can't move, again.
IF this'd happen or any variation:
oo oo o
x OR x OR x OR x
then it's possible for x to move diagonally up or just move in front of it.
My pseudocode:
public void move()
{
if (getOneObjectAtOffset(50, 0, Zwarteschijf || Witteschijf))
{
;
}
// if collides with an object 50p in front of it OR diagonally 50p up and 50p to either left or right, item becomes red.
}
Possibilities to move



(white)
(black)
White-red: used if the piece can't go anywhere
Black-red: used if the piece can't go anywhere