HAHAHAHA! Smileys..

This is for the assignment objects and classes!

I had so much fun doing this!!

You click em.. you see smileys :)
from create import*
#defines the grid. 
grid = [ [-1]*8 for n in range(8)]
grid[0][0] = 1
grid[7][7] = 1
def setup():
size(600,600)

global w
w = width/7

global a
a=0

global b
b=0

global Face
#defines the content of the grid
def draw():

x,y = 0,0
for row in grid:
for col in row:
if col == 1:

a=x+w/2
b=y+w/2

Face=create(w,a,b)
# Face.var=70
# Face.xposition=a
# Face.yposition=b
Face.draw()

else:
fill(201,144,181)
rect(x, y, w, w)
x = x + w
y = y + w
x = 0

#defines when to switch
def mousePressed():

grid[mouseY/w][mouseX/w] = -1 * grid[mouseY/w][mouseX/w]
# and here is how the class is defined:
class create(object):

def __init__(self,var,a,b):
self.var=var
self.xposition=a
self.yposition=b

def draw(self):
fill(134,202,222)
stroke(20)
ellipse(self.xposition,self.yposition, self.var, self.var)
stroke(10)
arc(self.xposition, self.yposition, 20, 20, 0.1, PI-0.1, OPEN)
fill(0)
ellipse(self.xposition-15,self.yposition-15,5,5)
ellipse(self.xposition+15,self.yposition-15,5,5)
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.