Skip to content

Commit

Permalink
version10dec
Browse files Browse the repository at this point in the history
  • Loading branch information
Morad Ait Abdellah committed Dec 10, 2019
1 parent a51936a commit 43e8dae
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
Binary file added puzzle proccessing/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions puzzle proccessing/sketch.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mode=Python
mode.id=jycessing.mode.PythonMode
33 changes: 33 additions & 0 deletions puzzle proccessing/sketch_191210b.pyde
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
char_width =20

def setup():
size(400, 400)

def draw():

for i in range(width/char_width):
for j in range (height/char_width):
import random
r= random.randint(0,1)

draw_slash(r,char_width * i,char_width * j)

noLoop()
SaveFrame('screenshot.png')
# pip install pyautogui
# import pyautogui

# pic= pyautogui.screenshot()

# pic.save('screenshot.png')


def draw_slash(fwd_slash,top,left):
if fwd_slash:
line(top,left+char_width/2,top+char_width,left+char_width/2)
else :
line (top+char_width/2,left,top+char_width/2,left+char_width)


# draw_slash(1,20,20)
# draw_slash(0,20,20)
26 changes: 26 additions & 0 deletions puzzlefinal .py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
char_width =20

def setup():
size(400, 400)

def draw():

for i in range(width/char_width):
for j in range (height/char_width):
import random
r= random.randint(0,1)

draw_slash(r,char_width * i,char_width * j)

noLoop()


def draw_slash(fwd_slash,top,left):
if fwd_slash:
line(top,left,top+char_width,left+char_width)
else :
line (top+char_width,left,top,left+char_width)


# draw_slash(1,20,20)
# draw_slash(0,20,20)

0 comments on commit 43e8dae

Please sign in to comment.