private static boolean depthFirstSearch(int x, int y, String word) {
        m_mark[x][y] = true;
        m_wordStack.push(x * 4 + y);

        if (word.length() == 0) {
            return true;
        }

        /* horizontal increments allowed in matrix */
        final int m_dx[] = {0, 0, 1, -1, -1, 1, -1, 1};
        /* vertical increments allowed in matrix */
        final int m_dy[] = {1, -1, 0, 0, 1, 1, -1, -1};

        for (int i = 0; i < 8; i++) {
            if (x + m_dx[i] >= 0 && x + m_dx[i] <= 3 && y + m_dy[i] >= 0 && y + m_dy[i] <= 3) {
                if (m_mark[x + m_dx[i]][y + m_dy[i]] == false && State.gameMatrix[x + m_dx[i]][y + m_dy[i]] == word.charAt(0)) {
                    boolean found = depthFirstSearch(x + m_dx[i], y + m_dy[i], word.substring(1));
                    if (found == true) {
                        return true;
                    }
                }
            }
        }

        /* unsuccessful search */
        m_mark[x][y] = false;
        m_wordStack.pop();
        return false;
    }