This file contains hidden or 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
| #https://github.com/PySimpleGUI/PySimpleGUI/blob/master/DemoPrograms/Demo_Matplotlib_Browser.py | |
| # !/usr/bin/env python | |
| import FreeSimpleGUI as sg | |
| import matplotlib | |
| matplotlib.use('TkAgg') | |
| from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg | |
| import numpy as np | |
| import matplotlib.pyplot as plt |
This file contains hidden or 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 FreeSimpleGUI as sg | |
| import FreeSimpleGUI as sg | |
| # Define the window's contents | |
| c_left = sg.Column(layout=[ | |
| [sg.Text("erste Zeile links1")], | |
| [sg.Text("beginn links2")], | |
| [sg.Text("links3")], |
This file contains hidden or 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
| # battle between 2 pokemons | |
| import random | |
| class Pokemon: | |
| def __init__(self, name): | |
| self.name = name | |
| self.hp_full = 100 | |
| self.hp = 100 |
This file contains hidden or 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 | |
| W, H = 2000, 1000 | |
| turtle.setup(W,H) | |
| screen = turtle.Screen() | |
| screen.setworldcoordinates(0,0,W,H) | |
| screen.tracer(0) | |
| # create turtles | |
| for i in range(50): | |
| t = turtle.Turtle() |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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(), |