hasWon :: Char -> [Move] -> Bool
hasWon m moves =
  let
    board = movesToString moves
    horizontals = fullRow m board -- Patikrinamos horizontalios eilutes
    vertical [a1,b1,c1,a2,b2,c2,a3,b3,c3] = fullRow m [a1,a2,a3,b1,b2,b3,c1,c2,c3] -- Vertikalios paverciamos horizontaliomis ir patikrinamos.
    diagonal [a1,_,b1,_,c2,_,b3,_,a3] = fullRow m [a1,c2,a3,b1,c2,b3] -- Istrizaines paverciamos horizontaliomis ir patikrinamos.
  in
    horizontals || diagonal board || vertical board
hasWon :: Char -> [Move] -> Bool
hasWon m moves =
  let
    board = movesToString moves
    horizontals = fullRow m board -- Patikrinamos horizontalios eilutes
    vertical [a1,b1,c1,a2,b2,c2,a3,b3,c3] = fullRow m [a1,a2,a3,b1,b2,b3,c1,c2,c3] -- Vertikalios paverciamos horizontaliomis ir patikrinamos.
    diagonal [a1,_,b1,_,c2,_,b3,_,a3] = fullRow m [a1,c2,a3,b1,c2,b3] -- Istrizaines paverciamos horizontaliomis ir patikrinamos.
  in
    horizontals || diagonal board || vertical board
hasWon m moves =
  let
    board = movesToString moves
    horizontals = fullRow m board -- Patikrinamos horizontalios eilutes
    vertical [a1,b1,c1,a2,b2,c2,a3,b3,c3] = fullRow m [a1,a2,a3,b1,b2,b3,c1,c2,c3] -- Vertikalios paverciamos horizontaliomis ir patikrinamos.
    diagonal [a1,_,b1,_,c2,_,b3,_,a3] = fullRow m [a1,c2,a3,b1,c2,b3] -- Istrizaines paverciamos horizontaliomis ir patikrinamos.
  in
    horizontals || diagonal board || vertical board