File size: 1,723 Bytes
6829252
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env python3
"""
Script to remove radar/scope visualization functions from ui.py (Sprint 3)
"""

def remove_radar_functions():
    ui_file = "wrdler/ui.py"

    with open(ui_file, 'r', encoding='utf-8') as f:
        lines = f.readlines()

    # Find line numbers to remove
    # Based on grep output: lines 872-1089 contain the three radar functions

    # We need to remove from the start of get_scope_image to the end of _render_radar
    start_marker = "def get_scope_image("
    end_marker = "def _render_grid("

    new_lines = []
    skip_mode = False

    for i, line in enumerate(lines, 1):
        if start_marker in line:
            skip_mode = True
            # Add comment about removal
            new_lines.append("\n")
            new_lines.append("# NOTE: Radar/scope visualization functions removed for Wrdler (Sprint 3)\n")
            new_lines.append("# - get_scope_image() removed\n")
            new_lines.append("# - _create_radar_scope() removed\n")
            new_lines.append("# - _render_radar() removed\n")
            new_lines.append("# Wrdler uses simplified 8x6 grid with no scope visualization\n")
            new_lines.append("\n")
            continue

        if end_marker in line and skip_mode:
            skip_mode = False
            # Don't skip this line, it's the start of the next function

        if not skip_mode:
            new_lines.append(line)

    # Write back
    with open(ui_file, 'w', encoding='utf-8') as f:
        f.writelines(new_lines)

    print(f"[OK] Removed radar functions from {ui_file}")
    removed_lines = len(lines) - len(new_lines)
    print(f"  Removed {removed_lines} lines")

if __name__ == "__main__":
    remove_radar_functions()