repl.it
@BrickBoston/

Kakashi Painting Simulator

Python (with Turtle)

Controls: W-A-S-D to move around Space to stamp Q-E for brush down/up R-Y-G-B-D for colors 1-9 to change brush size C to clear Esc to quit

fork
loading
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import turtle
wn = turtle.Screen()
pen = 0

print("Kakashi Painting Simulator: A Pygame By")
print(" __               __    __              __ ")
print("|| |\      @      ||   || |\            ||") 
print("||_// |//  ||  /= ||// ||_//  /=\  /== ====  /=\  |//|\ ")
print("|| |\ ||   || ||  |<   || |\ || || \    ||  || || || ||") 
print("||_// ||   ||  \= ||`\ ||_//  \=/  ==>  ||   \=/  || ||")

print("Go to result screen to play.")
print("Controls:")
print("W-A-S-D to move")
print("Q-E for pen up/down")
print("R-Y-G-B-D for colors")
print("Space to stamp")
print("1-9 to change brush size")
print("C to clear screen")
print("Esc to quit")                          

last_pressed = 'up'
def setup(col, x, y, w, s, shape):
  turtle.up()
  turtle.goto(x,y)
  turtle.width(w)
  turtle.color(255, 0, 255)
  turtle.lt(90)
  turtle.down()
  wn.onkey(up, "Up")
  wn.onkey(left, "Left")
  wn.onkey(right, "Right")
  wn.onkey(back, "Down")
  wn.onkey(quitTurtles, "Escape")
  wn.onkey(turtle.pendown, "Q")
  wn.onkey(turtle.penup, "E")
  wn.onkey(turtle.stamp, "Space")
  wn.onkey(size1, "1")
  wn.onkey(size2, "2")
  wn.onkey(size3, "3")
  wn.onkey(size4, "4")
  wn.onkey(size5, "5")
  wn.onkey(size6, "6")
  wn.onkey(size7, "7")
  wn.onkey(size8, "8")
  wn.onkey(size9, "9")
  wn.onkey(red, "r")
  wn.onkey(yellow, "y")
  wn.onkey(green, "g")
  wn.onkey(blue, "b")
  wn.onkey(dark, "d")
  wn.onkey(turtle.clear, "c")
  wn.listen()
  wn.mainloop()

#Event handlers
def up():
  turtle.fd(5)

def left():
  turtle.lt(5)

def right():
  turtle.rt(5)

def back():
  turtle.back(5)

def size1():
  turtle.pensize(1)

def size2():
  turtle.pensize(2)

def size3():
  turtle.pensize(3)

def size4():
  turtle.pensize(4)

def size5():
  turtle.pensize(5)

def size6():
  turtle.pensize(6)

def size7():
  turtle.pensize(7)

def size8():
  turtle.pensize(8)

def size9():
  turtle.pensize(9)

def red():
  turtle.color(255, 0, 0)

def orange():
  turtle.color(255, 128, 0)

def yellow():
  turtle.color(255, 255, 0)

def green():
  turtle.color(0, 255, 0)

def blue():
  turtle.color(0, 0, 255)

def purple():
  turtle.color(255, 0, 255)

def dark():
  turtle.color(0, 0, 0)

def quitTurtles():
  wn.bye()

setup("blue",-200,200,2,2,"turtle")
result
console
?