I am programming a game where users can edit the state of a maze. The state of each vertical and horizontal wall (present/not present, on/off, 1/0, etc...) is stored in a database and then referenced when users edit the maze. I need an equation for checking that the maze is solvable (i.e. the path from the start to the finish is not blocked) before the edited maze is saved.
The state values of the vertical and horizontal walls are each saved in their own matrix, or if you are familiar with programming, a 2 Dimensional array.
For instance if the vertical walls matrix looks like this: $$ \begin{bmatrix} 0 & 1 & 1 & 1 & 0\\ 1 & 1 & 0 & 1 & 0\\ 0 & 0 & 1 & 1 & 0\\ 1 & 1 & 0 & 0 & 1\\ 1 & 1 & 0 & 1 & 0\\ \end{bmatrix} $$

And the horizontal walls matrix looks like this:
$$ \begin{bmatrix} 1 & 0 & 0 & 1 & 1\\ 1 & 0 & 0 & 1 & 0\\ 0 & 1 & 0 & 1 & 1\\ 0 & 0 & 1 & 0 & 1\\ 0 & 1 & 0 & 1 & 0\\ \end{bmatrix} $$

What equation or method could be used to check if a player could get from the green X to the orange X?

I apologize if my jargon or tags are not accurate. I am coming to this forum from a programming not mathematics background. I greatly appreciate any help that could be sent my way.
One way is to use a "right hand rule" like this
http://en.wikipedia.org/wiki/Maze_solving_algorithm
You might also find this helpful.
https://stackoverflow.com/questions/9191428/maze-solving-algorithm-in-c