digging around it and yes we can implement a check at each point where we say like oh if we dig here we're going to check all its neighbors and then we're going to dig again and you know so on but we could also just assign values to every single space on the board that represents how many bombs are in the neighboring spaces so let's call that assign values to board so here let's define assigned values to board and pass in self all right so now that we have the bombs planted we're assigning a number zero through eight for all the empty spaces that don't have bombs and this is basically representing how many neighboring bombs are there we can pre-compute these and it'll save some effort checking what's around that square later on basically we want to check every row and every column so for r and range self dot dimension size for c and range URL_TOKEN size this is going to be the row index and the column index so if the item at the board so if at those indices on the board it's a bomb we're going to continue right because we don't want to actually override any of the bombs that we've planted but if it's not then we pass this if statement and then we say okay for this location on the board let's create a new function called get num neighboring bombs pass in the row index and the column index and then this function is going to give us the number of bombs that is surrounding that row comma column all right so let's define this define get number of neighboring bombs we're passing in the rogue and the column like if you're confused of why i have r comma c up top and then row comma call these are just variable names you just have to make sure that they match where you're actually calling them so for example when i call the function i'm passing it r comma c because i've defined r and i've defined c in my for loop so those are variables that i've defined and now when i create this new function i can call the parameters that get passed in whatever i want right and so here the r would correspond to the row and the c would correspond to the column so now let's iterate through each of the neighboring positions and sum up the number of bombs so here i've kind of imported a list of all the neighboring positions you can see the top left is row minus one column minus one and top middle is row minus one column you know and so on and so we're going to check all of these and we have to make sure that we don't go out of bounds so that's just a little reminder okay so first we're going to initialize the number of neighboring bombs just to a variable set it to zero this is going to be our counter and then we're going to say for r and range row minus one row plus one and then keep in mind that due to the nature of the range function in python we have to add a plus one to the end and then same thing for the column for c and range column minus one column plus one plus one um that should be a plus all right so basically what we're doing here is for the current row that we're at
NO_SEGMENT_TOKEN