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 PySimpleGUI as sg | |
import random | |
#sg.theme("Material1") | |
#sg.theme_element_background_color(color = "#000000") | |
#sg.theme_background_color(color="#FFFFFF") | |
#sg.theme_button_color(color="#FFFFFF") | |
class Game: |
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 adventurelib as adv | |
class Game: | |
current_room = None | |
player_inventory = adv.Bag() | |
bedroom = adv.Room(""" | |
This is a bedroom. It's big and comfortable | |
""") |
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 flet as ft | |
import random | |
class Game: | |
game_turn = 1 | |
player = "Player One" | |
char = "X" | |
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
player1 = "Spieler1" | |
player2 = "Spieler2" | |
def display(): | |
for y, line in enumerate(board): | |
print(f"{line[0]}|{line[1]}|{line[2]}") | |
if y < 2: | |
print("-+-+-") | |
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 flet as ft | |
import random | |
class Game: | |
versuch = 1 | |
log = [] | |
def main(page: ft.Page): | |
secret = random.randint(1,1000) |
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 flet as ft | |
import random | |
def main(page): | |
secret = random.randint(1,1000) | |
versuch = 1 | |
def add_clicked(e): | |
#page.add(ft.Checkbox(label=new_task.value)) | |
zahl = int(eingabe.value) | |
eingabe.value = "" |
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 | |
""" | |
crocodile puzzle | |
move and rotate tiles | |
""" | |
import random | |
def paint_head(size=100, big=20, medium=15, small=7): |
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 PySimpleGUI as sg | |
import random | |
import time | |
#from matplotlib.colors import hex2color | |
RESOLUTIONS = ["100x100", "200x200", "320x200", "400x400", "600x600", "640x400","800x600","1024x800", "1024x960","1280x1024"] | |
WIDTH, HEIGHT = 400,400 | |
MIN_TILES = 10 | |
MAX_TILES = 50 | |
TX = 40 |
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 random | |
class Player: | |
number = 1 | |
images = [] | |
def __init__(self, pos=None, color="#222222"): | |
self.number = Player.number |
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
""" Sprite Sample Program """ | |
import random | |
import arcade | |
# --- Constants --- | |
SPRITE_SCALING_PLAYER = 2.0 | |
SPRITE_SCALING_COIN = 2.0 | |
SPRITE_SCALING_PLATFORM = 0.5 | |
PLATFORM_COUNT = 10 |