from casioplot import set_pixel as S
from casioplot import show_screen as R

def draw(data, pallet, width):
    x = 0
    y = 0
    for v in data:
        S(x, y, pallet[v])
        x += 1
        if x == width:
            x = 0
            y += 1
    R()
