Question: Hi, This is python(3.4) programming problem about Connect Four game. For the problem above, I have a problem with drop_bomb function. Below is my code:

Hi, This is python(3.4) programming problem about "Connect Four" game.Hi, This is python(3.4) programming problem about "Connect Four" game. For the

For the problem above, I have a problem with drop_bomb function. Below is my code:

def drop_bomb(board, col_num): col_num = col_num - 1 if col_num or col_num > board._num_cols - 1: return -1 for i in range(board._num_rows): board._slots[i][col_num] = '.'   return col_num + 1 

For example:

problem above, I have a problem with drop_bomb function. Below is my

Part VI: drop bomb (board, col num) (4 points This function drops a bomb down the given column of the board, replacing all 'X's and O' s with and returning the value col-num. If col-num is outside the range [1, board.-col-num], the function instead returns -1. In cases whether an invalid bomb drop is attempted, the contents of board must be left unchanged

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!