main :: IO ()
main = do
  let winConfig = ((200,100),(780,600),"WORMS - by Andre Furtado")

      gameMap = multiMap [(tileMap map1 tileSize tileSize),
                          (tileMap map2 tileSize tileSize),
                          (tileMap map3 tileSize tileSize)] 0

      gameAttribute = GA defaultTimer maxFood initTailSize initPos 0

      groups = [(objectGroup "messages"  createMsgs ),
                (objectGroup "head"     [createHead]),
                (objectGroup "food"     [createFood]),
                (objectGroup "tail"      createTail )]

      input = [
               (SpecialKey KeyLeft,  Press, turnLeft ),
               (SpecialKey KeyRight, Press, turnRight),
               (SpecialKey KeyUp,    Press, turnUp   ),
               (SpecialKey KeyDown,  Press, turnDown )
              ,(Char 'q',            Press, \_ _ -> funExit)
              ]
  
  bmpList' <- mapM (\(a,b) -> do { a' <- getDataFileName ("examples/worms/"++a); return (a', b)}) bmpList
  funInit winConfig gameMap groups (LevelStart 1) gameAttribute input gameCycle (Timer 150) bmpList'
main :: IO ()
main = do
  let winConfig = ((200,100),(780,600),"WORMS - by Andre Furtado")

      gameMap = multiMap [(tileMap map1 tileSize tileSize),
                          (tileMap map2 tileSize tileSize),
                          (tileMap map3 tileSize tileSize)] 0

      gameAttribute = GA defaultTimer maxFood initTailSize initPos 0

      groups = [(objectGroup "messages"  createMsgs ),
                (objectGroup "head"     [createHead]),
                (objectGroup "food"     [createFood]),
                (objectGroup "tail"      createTail )]

      input = [
               (SpecialKey KeyLeft,  Press, turnLeft ),
               (SpecialKey KeyRight, Press, turnRight),
               (SpecialKey KeyUp,    Press, turnUp   ),
               (SpecialKey KeyDown,  Press, turnDown )
              ,(Char 'q',            Press, \_ _ -> funExit)
              ]
  
  bmpList' <- mapM (\(a,b) -> do { a' <- getDataFileName ("examples/worms/"++a); return (a', b)}) bmpList
  funInit winConfig gameMap groups (LevelStart 1) gameAttribute input gameCycle (Timer 150) bmpList'
main = do
  let winConfig = ((200,100),(780,600),"WORMS - by Andre Furtado")

      gameMap = multiMap [(tileMap map1 tileSize tileSize),
                          (tileMap map2 tileSize tileSize),
                          (tileMap map3 tileSize tileSize)] 0

      gameAttribute = GA defaultTimer maxFood initTailSize initPos 0

      groups = [(objectGroup "messages"  createMsgs ),
                (objectGroup "head"     [createHead]),
                (objectGroup "food"     [createFood]),
                (objectGroup "tail"      createTail )]

      input = [
               (SpecialKey KeyLeft,  Press, turnLeft ),
               (SpecialKey KeyRight, Press, turnRight),
               (SpecialKey KeyUp,    Press, turnUp   ),
               (SpecialKey KeyDown,  Press, turnDown )
              ,(Char 'q',            Press, \_ _ -> funExit)
              ]
  
  bmpList' <- mapM (\(a,b) -> do { a' <- getDataFileName ("examples/worms/"++a); return (a', b)}) bmpList
  funInit winConfig gameMap groups (LevelStart 1) gameAttribute input gameCycle (Timer 150) bmpList'