def test_range_check__should_return_True_for_valid_set_of_coordinates(): temp_x = 8 temp_y = 13 actual = range_check(temp_x, temp_y) assert actual
def test_range_check__should_return_False_for_y_coord_above_fourteen(): temp_x = 15 temp_y = -1 actual = range_check(temp_x, temp_y) assert not actual
def test_range_check__should_return_False_for_y_coord_below_zero(): temp_x = 5 temp_y = -1 actual = range_check(temp_x, temp_y) assert not actual
def find_possible_second_letter_coords(coords): x, y = coords possible_moves = [] for move in moves: temp_x, temp_y = apply_move_to_coordinates(x, y, move) if range_check(temp_x, temp_y): possible_moves.append((temp_x, temp_y)) return possible_moves
def compare_remaining_letters(grid, letter_index, match, remaining_coords, temp_x, temp_y, word): if range_check(temp_x, temp_y): if grid[temp_x][temp_y].lower() == word[letter_index].lower(): remaining_coords.append((temp_x, temp_y)) letter_index += 1 else: match = False else: match = False return letter_index, match, remaining_coords