"""
Utility functions for Py2048
"""

def format_score(score):
    """Format score with commas"""
    return f"{score:,}"

def get_tile_color(value):
    """Get background color for a tile (for web/GUI version)"""
    colors = {
        0: '#cdc1b4',
        2: '#eee4da',
        4: '#ede0c8',
        8: '#f2b179',
        16: '#f59563',
        32: '#f67c5f',
        64: '#f65e3b',
        128: '#edcf72',
        256: '#edcc61',
        512: '#edc850',
        1024: '#edc53f',
        2048: '#edc22e',
    }
    return colors.get(value, '#3c3a32')
