'''
Happy Pi-thon Day! Project
'''
from codex import *
import time
import random

pi = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679'

pi_facts = [
    "Pi is an irrational number.",
    "Pi has been calculated to over 62.8 trillion digits!",
    "The symbol for Pi was first used in 1706.",
    "Pi Day is also Albert Einstein's birthday!",
    "The formula for the circumference of a circle is 2*pi*radius",
    "The formula for the area of a circle is pi*radius*radius",
    "Pi was estimated independently in China around 400 AD.",
    "Archimedes proposed the first formal method for estimating Pi.",
    "Pi can be estimated arbitrarily closely using toothpicks.",
    "There is an entire language made from the number Pi."
]

def snake_head(snake_x, pi_y):
    display.draw_line(snake_x, pi_y+15, snake_x+22, pi_y+15, GREEN)
    display.fill_rect(snake_x+15, pi_y, 35, 30, WHITE)
    display.fill_circle(snake_x+40, pi_y+8, 5, RED)
    display.fill_circle(snake_x+40, pi_y+20, 5, RED)

def instructions():
    display.print('March 14', scale=3, color=CYAN)
    display.print('Happy', scale=3, color=YELLOW)
    display.print("'Pi'-thon", scale=3, color=GREEN)
    display.print('Day!', scale=3, color=YELLOW)
    display.print()
    display.print('A / Start')
    display.print('B / Pi Fact')
    display.print('D / Stop')

# -- Main Program --
instructions()
while True:
    if buttons.was_pressed(BTN_A):
        display.clear()
        break

