Skip to content

Instantly share code, notes, and snippets.

@PaulPolaschek
PaulPolaschek / cannon2players.py
Created November 10, 2018 21:01
2 player artillery game with python turtle
import turtle
import random
turtle.setup(1400,700)
p1=turtle.Turtle()
p1.pencolor("blue")
p1.pensize(3)
p1.fillcolor("blue")
import random
"""
#########################################
#.......................................#
#.......................................#
#########################################
"""
maxlines=23
import turtle
import random
#rekursive tree
def branch(length=50, angle=30, factor=0.5, stops=2):
if length < 5:
return
turtle.fd(length)
turtle.left(angle)
import random
"""
#########################################
#.......................................#
#.......................................#
#########################################
"""
maxlines=5
import turtle
import random
def nadelbaum(c1="brown", c2stamm="brown",
c2nadeln="green", breite=20
hoehe=50):
turtle.color("brown","brown")
turtle.begin_fill()
turtle.forward(20)
turtle.right(90)
@PaulPolaschek
PaulPolaschek / cannon1.py
Last active November 10, 2018 20:48
artillery game with python turtle
import turtle
import random
turtle.setup(1400,800)
peter=turtle.Turtle()
peter.pencolor("blue")
peter.pensize(3)
peter.fillcolor("red")
@PaulPolaschek
PaulPolaschek / paul2.py
Created October 3, 2018 17:47
random python 3 turtle
import turtle
import random
rosi = turtle.Turtle()
rosi.speed(0)
rosi.shape("turtle")
rosi.pensize(2)
rosi.pencolor("green")
rosi.fillcolor("red")
rosi.goto(-100,-50)
@PaulPolaschek
PaulPolaschek / paul1.py
Created October 3, 2018 17:46
python3 turtle
import turtle
import random
rosi = turtle.Turtle()
rosi.speed(0)
rosi.shape("turtle")
rosi.pensize(2)
rosi.pencolor("green")
rosi.fillcolor("red")
rosi.goto(-100,-50)