This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# friction, acceleartion and drifting | |
import pygame | |
import random | |
W, H = 1280, 720 | |
class TextSprite(pygame.sprite.DirtySprite): | |
def __init__(self, pos, color, textsize, text, age_max ): | |
self.dirty = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
import os | |
# Example file showing a circle moving on screen | |
W,H = 1280, 720 | |
FPS = 60 | |
APS = 4 # animations per second | |
# pygame setup | |
pygame.init() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import vpython as vp | |
class Game: | |
scene = vp.canvas(width=1024, | |
height=600, | |
title="linus rogue") | |
fps = 30 | |
dt = 1/fps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import vpython as vp | |
vp.arrow(axis=vp.vec(1,0,0), | |
color=vp.color.red) | |
vp.arrow(axis=vp.vec(0,1,0), | |
color=vp.color.green) | |
vp.arrow(axis=vp.vec(0,0,1), | |
color=vp.color.blue) | |
vp.label(text="x", pos=vp.vec(1.1,0,0)) | |
vp.label(text="y", pos=vp.vec(0,1.1,0)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import vpython as vp | |
# z ziel | |
# $ stacheln für schalter 4 | |
# 4 schalter für stacheln $ | |
# % stacheln für schalter 5 | |
# 5 schalter für stacheln % | |
# & stacheln für schalter 6 | |
# 6 schalter für stachelen & | |
# / versenkbare Türe für Schalter 7 | |
# 7 schalter für Türe / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import turtle | |
import random | |
breite = 1200 | |
höhe = 800 | |
turtle.setup(breite,höhe) | |
turtle.speed(0) | |
stall = [turtle.Turtle(), | |
turtle.Turtle(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example file showing a circle moving on screen | |
import pygame | |
# pygame setup | |
pygame.init() | |
screen = pygame.display.set_mode((1280, 720)) | |
clock = pygame.time.Clock() | |
running = True | |
dt = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import turtle | |
import random | |
class Salat(turtle.Turtle): | |
salatliste = [] | |
def __init__(self): | |
super().__init__() | |
self.hideturtle() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import turtle | |
import random | |
class Stern(turtle.Turtle): | |
sternenliste = [] | |
löschen = False # muss man einen Stern löschen? | |
def __init__(self, pos, startfarbe=(1,1,0), endfarbe=(1,1,1)): | |
super().__init__() | |
self.hideturtle() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start = """<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
table { | |
font-family: arial, sans-serif; | |
border-collapse: collapse; | |
width: 100%; | |
} |