From fab433a1df751c676f0bccfe6401d4359232b259 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 9 Mar 2023 15:53:43 +0000 Subject: [PATCH] Init --- LICENSE | 32 ++++++++++ Pixelmania.ttf | Bin 0 -> 6844 bytes README.md | 2 + icon.ico | Bin 0 -> 4286 bytes main.py | 159 +++++++++++++++++++++++++++++++++++++++++++++++++ main.spec | 34 +++++++++++ 6 files changed, 227 insertions(+) create mode 100644 LICENSE create mode 100644 Pixelmania.ttf create mode 100644 README.md create mode 100644 icon.ico create mode 100644 main.py create mode 100644 main.spec diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d6b017a --- /dev/null +++ b/LICENSE @@ -0,0 +1,32 @@ +Pixelmania.ttf: +=============== + +http://www.imagex-fonts.com/planche.php?idPolice=276 + +Everything else: +================ + +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/Pixelmania.ttf b/Pixelmania.ttf new file mode 100644 index 0000000000000000000000000000000000000000..0c20d6a4d4e48857343ae1506d11327aa629e246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~~+p z)obv#3jGPT9)Bw_s#d;@VMGJl$l4$~30XALZag)!hu9|cbh92jb)qjS;lTo5$t~)*?0N#i&(m z2ihI%3HfajGU#15?p=x8>D7_K`t~G2m(5{6S>VaVcdl<|~@eIlM-vaS(5yRit literal 0 HcmV?d00001 diff --git a/README.md b/README.md new file mode 100644 index 0000000..cb31d6a --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# incest-machine +Just a screensaver diff --git a/icon.ico b/icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..ba733c02df0735d442c5e7222ca5de161e11fc8a GIT binary patch literal 4286 zcmeHIu?>JQ3^N}vb?$=1%Fvx#nK*%~cp-I|nd+g7Q@KN`$Wr3Cz`|22^2WUa1;9=) zg_Fqq7kvAPU~U*~dqRQ2owW*g)|!8O_U^y+=l!$)DH^c<&h_8-IzoXuKZQGM&9CXl Z{kQ%V4S4^&e~Jba?b-kJ|Bthq8Xc!$(M13N literal 0 HcmV?d00001 diff --git a/main.py b/main.py new file mode 100644 index 0000000..16d39d3 --- /dev/null +++ b/main.py @@ -0,0 +1,159 @@ +#!/usr/bin/env python3 + +import sys +import pygame +import random +import time +import math +import os + +def resource_path(relative_path): + try: + base_path = sys._MEIPASS + except Exception: + base_path = os.path.abspath(".") + return os.path.join(base_path, relative_path) + +print(os.path.dirname(sys.argv[0])) + +pygame.init() +pygame.display.set_caption("Incest Machine") +pygame.mouse.set_visible(False) +screen_size = pygame.display.Info() +try: + font = pygame.font.Font(resource_path("Pixelmania.ttf"), 16) +except: + font = pygame.font.Font(os.path.join(os.path.dirname(sys.argv[0]), "Pixelmania.ttf"), 16) +white = (255,255,255) +blue = (0,0,255) +red = (255,0,0) + +# 4 Pairs of adams end eves +start_creatures = 4 + +max_creatures = (math.floor(screen_size.current_w / 32) * math.floor(screen_size.current_h / 32)) / 10 + +screen = pygame.display.set_mode([screen_size.current_w, screen_size.current_h], pygame.FULLSCREEN) + +tick = pygame.time.Clock() +tick_rate = 600 + +creatures = [] +games = 0 # Number of games +count_m = 0 # Males +count_f = 0 # Females +wins_m = 0 # Males win +wins_f = 0 # Females win +lastwinner = 3 # 0 = Males, 1 = Females, 2 = Draw, 3 = First run + +# New creature +def newCreature(sex): + creature = [ + random.randint(0, (math.floor(screen_size.current_w / 32)) - 1) * 32, + random.randint(0, (math.floor(screen_size.current_h / 32)) - 1) * 32, + sex + ] + global count_m + global count_f + if sex == 0: count_m = count_m + 1 + if sex == 1: count_f = count_f + 1 + + creatures.append(creature) + +# Adam and Eve +for x in range(0, start_creatures): + newCreature(0) + newCreature(1) + +running = True + +while running: + + # Blank screen + screen.fill((0, 0, 0)) + + # Quit + for event in pygame.event.get(): + if event.type == pygame.KEYDOWN or event.type == pygame.MOUSEBUTTONDOWN: + sys.exit() + + for creature in creatures: + # Movement + x = creature[0] + y = creature[1] + + direction = random.randint(0, 7) + if direction == 0 and x < screen_size.current_w - 32: x = x + 32 + if direction == 1 and y < screen_size.current_h - 32: y = y + 32 + if direction == 2 and x > 0: x = x - 32 + if direction == 3 and y > 0: y = y - 32 + + # Draw + if creature[2] == 0: color = red + if creature[2] == 1: color = blue + pygame.draw.rect(screen, color, (x, y, 32, 32)) + + # Update creature + creature[0] = x + creature[1] = y + + # Fixed text + row1 = font.render('MALES', False, red) + row2 = font.render('FEMALES', False, blue) + row3 = font.render('GAMES', False, white) + row4 = font.render('LAST WINNER', False, white) + row5 = font.render('WINS BY MALES', False, red) + row6 = font.render('WINS BY FEMALES', False, blue) + screen.blit(row1, (10, 10)) + screen.blit(row2, (10, 40)) + screen.blit(row3, (10, 70)) + screen.blit(row4, (10, 100)) + screen.blit(row5, (10, 130)) + screen.blit(row6, (10, 160)) + + # Text + row1 = font.render(str(count_m), False, red) + row2 = font.render(str(count_f), False, blue) + row3 = font.render(str(games), False, white) + if lastwinner == 0: row4 = font.render('MALES', False, red) + if lastwinner == 1: row4 = font.render('FEMALES', False, blue) + if lastwinner == 2: row4 = font.render('DRAW', False, white) + if lastwinner == 3: row4 = font.render('', False, white) + row5 = font.render(str(wins_m), False, red) + row6 = font.render(str(wins_f), False, blue) + screen.blit(row1, (400, 10)) + screen.blit(row2, (400, 40)) + screen.blit(row3, (400, 70)) + screen.blit(row4, (400, 100)) + screen.blit(row5, (400, 130)) + screen.blit(row6, (400, 160)) + + # Update screen + pygame.display.update() + tick.tick(tick_rate) + + # Check for collisions + for male in creatures: + if male[2] == 0: + for female in creatures: + if female[2] == 1: + if male[0] == female[0] and male[1] == female[1]: + newCreature(random.randint(0, 1)) + + # Restart + if len(creatures) >= max_creatures: + if count_m > count_f: + lastwinner = 0 + wins_m = wins_m + 1 + elif count_f > count_m: + lastwinner = 1 + wins_f = wins_f + 1 + else: + lastwinner = 2 + count_m = 0 + count_f = 0 + games = games + 1 + creatures = [] + for x in range(0, start_creatures): + newCreature(0) + newCreature(1) diff --git a/main.spec b/main.spec new file mode 100644 index 0000000..6d99e69 --- /dev/null +++ b/main.spec @@ -0,0 +1,34 @@ +# -*- mode: python ; coding: utf-8 -*- + +block_cipher = None + + +a = Analysis(['main.py'], + pathex=['C:\\Users\\gideonstar\\Desktop\\Incest Machine'], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=[], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +a.datas += [('Pixelmania.ttf', 'Pixelmania.ttf', "DATA")] +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='main', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=False, icon='icon.ico')