Spring Deals - hours only!Up to 70% off on all courses and bundles.-Close
Introduction
Cyber Battle Game
Game elements
Main Game Loop
Robot moves
Final game

Instruction

And finally, we have the last helper function. It checks if a given position is within the board's borders.

Exercise

Write an is_within_board(board, row, column) function to check if the given row and column is within the board. This function returns either True or False.

Stuck? Here's a hint!

Get the board's dimensions with:

board_height = len(board)
board_width = len(board[0])

Then, check if the row and column are within the board's length.