nl_tokens: Checks if a square ( tile ) is visible .
pl_tokens: function checkSquareInView ( m , v ) { var check1 = checkInView ( m , v . slice ( 0 , 3 ) ) ; var check2 = checkInView ( m , v . slice ( 3 , 6 ) ) ; var check3 = checkInView ( m , v . slice ( 6 , 9 ) ) ; var check4 = checkInView ( m , v . <mask> ( 9 , 12 ) ) ; var testX = check1 [ 0 ] + check2 [ 0 ] + check3 [ 0 ] + check4 [ 0 ] ; if ( testX == - 4 || testX == 4 ) return false ; var testY = check1 [ 1 ] + check2 [ 1 ] + check3 [ 1 ] + check4 [ 1 ] ; if ( testY == - 4 || testY == 4 ) return false ; var testZ = check1 [ 2 ] + check2 [ 2 ] + check3 [ 2 ] + check4 [ 2 ] ; return testZ != 4 ; }