given a cell we must determine its neighbouring


Given a cell, we must determine its neighbouring cells i.e. those with which it shares a wall. The cells with an x are the neighbours of the cell c. Write the function getneighbours that accepts a cell, the width and height of the grid, and returns all neighbours of the given cell.

e.g. >>> getneighbours(cell0,4,5)

[('cell', (0, 1), ['t', 'b', 'r', 'l']), ('cell', (1, 0),['t', 'b', 'r', 'l'])]

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: given a cell we must determine its neighbouring
Reference No:- TGS0208407

Expected delivery within 24 Hours