checkSnakeCollision :: WormsObject -> WormsAction ()
checkSnakeCollision snakeHead = do
  headPos <- getObjectPosition snakeHead
  tile <- getTileFromWindowPosition headPos
  tails <- getObjectsFromGroup "tail"
  col <- objectListObjectCollision tails snakeHead
  if ( (getTileBlocked tile) || col)
          then (do setGameState GameOver
                   disableObjectsDrawing
                   disableObjectsMoving
                   setGameAttribute (GA defaultTimer 0 0 (0,0) 0))
          else return ()
checkSnakeCollision :: WormsObject -> WormsAction ()
checkSnakeCollision snakeHead = do
  headPos <- getObjectPosition snakeHead
  tile <- getTileFromWindowPosition headPos
  tails <- getObjectsFromGroup "tail"
  col <- objectListObjectCollision tails snakeHead
  if ( (getTileBlocked tile) || col)
          then (do setGameState GameOver
                   disableObjectsDrawing
                   disableObjectsMoving
                   setGameAttribute (GA defaultTimer 0 0 (0,0) 0))
          else return ()
checkSnakeCollision snakeHead = do
  headPos <- getObjectPosition snakeHead
  tile <- getTileFromWindowPosition headPos
  tails <- getObjectsFromGroup "tail"
  col <- objectListObjectCollision tails snakeHead
  if ( (getTileBlocked tile) || col)
          then (do setGameState GameOver
                   disableObjectsDrawing
                   disableObjectsMoving
                   setGameAttribute (GA defaultTimer 0 0 (0,0) 0))
          else return ()