I was wondering if someone could explain to me what (-2)(-2) in the brackets in the first line of the code stand for. I am new to Haskell and I’m trying to understand.
to_up_left board (x, y, t, c) (-2)(-2) = to_up_left board (x, y, t, c) x y
to_up_left board (x, y, t, c) 0 _ = []
to_up_left board (x, y, t, c) _ 9 = []
to_up_left board ((-1), y, t, c) _ _ = []
to_up_left board (x, y, t, c) _x _y = if (empty_field board (_x-1) (_y+1)) && (t == 'a' || t == 'A' )
then concat [decode_x x ++ decode_y y ++ "-" ++ decode_x (_x-1) ++ decode_y (_y+1)]: to_up_left board (x, y, t, c) (_x-1) (_y+1)
else if (friend_on_field board (_x-1) (_y+1)) && (t == 'a' || t == 'A' )
then concat [decode_x x ++ decode_y y ++ "-" ++ decode_x (_x-1)++ decode_y (_y+1)]: []
else []