How to update the grid states of multiple ants


how to update the grid's states of multiple ants?

advanceAnts :: Grid -> [Ant] -> [Ant]
advanceAnts g [] = []
advanceAnts g (((x,y),d):ants) = (advance ((x,y),d) ((g!!(y))!!(x)) gridSizeX gridSizeY):(advanceAnts g ants)

updateAnts :: Grid -> [Ant] -> Grid
updateAnts [] (((x,y),d):ants) = []
updateAnts g (((x,y),d):ants) = update g (x,y) 

advanceWorld :: World -> World
advanceWorld (g, (((x,y),d):ants)) = (updateAnts g (((x,y),d):ants), advanceAnts g(((x,y),d):ants)) 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: How to update the grid states of multiple ants
Reference No:- TGS0131507

Expected delivery within 24 Hours