def __init__(self, n, game):
     self.n = n
     self.game = game
     self.col = self.green, self.yellow, self.blue, self.red,\
       self.orange, self.brown, self.purple = self.game.col
     self.pr = Imagination.printer(100, 100, self.game.font, self.brown)
     sys.__stdout__ = sys.stdout
     sys.stdout = self.pr
     self.key = self.game.key
     self.key.extend([(pygame.K_e, "Easter Egg")])
     if self.n == 1:
         print("They sent me in this weird game to return Simplicity.")
         print("To steal those Statues of Complexity with big noses!")
     elif self.n == 2:
         print("I'm a bit mad at them.")
         print("They haven't even made good game.")
     elif self.n == 3:
         print("It's buggy, unfinished, without sounds.")
         print("Why should I listen to them?")
     elif self.n == 4:
         print("They are against Complexity and they praise Simplicity.")
         print("And I'm quite complex as Time Painter.")
     elif self.n == 5:
         print("They will probably steal my Colours.")
         print("But Simplicity obviously have it's price.")
     elif self.n == 6:
         print("Should I work for people who will steal my time because")
         print("I'm different?")
         print("Should I help others and end Complexity of Colours?")
     elif self.n == 7:
         print("It's your choice! Simplicity vs Complexity,")
         print("normall vs different, one-coloured vs more-coloured,")
         print("mass vs individual, marytr vs tortuer.")
         print("You can pick last Statue or send me outside the Screen.")
     super().__init__("doc/art/map/" + str(n), [{}, {"platforms":
       pl_group}, {"player": things.player, "enemy": things.enemy,
       "statue": things.statue}])
Exemplo n.º 2
0
Arquivo: 1.py Projeto: Python3pkg/Mind
from Mind import Imagination
import pygame

screen = pygame.display.set_mode((800, 500))
running = True

pygame.init()

font = pygame.font.SysFont(None, 50)

Main_menu = Imagination.Vertical_menu(Imagination.PLACE(True), 150)
keyboard = Main_menu.get_keyboard()
keyboard.extend([(pygame.K_ESCAPE, "quit")])

Main_menu.add_option(
    Imagination.text_option(font, "Start", (255, 0, 0), Main_menu), True)
Main_menu.add_option(
    Imagination.text_option(font, "Options", (0, 255, 0), Main_menu))
Main_menu.add_option(
    Imagination.text_option(font, "Quit", (0, 0, 255), Main_menu))
Main_menu.set_options()

while running:
    if keyboard.keys["quit"]:
        running = False

    screen.fill((255, 255, 255))

    Main_menu.blit()

    pygame.display.flip()
Exemplo n.º 3
0
from Mind import Imagination
import pygame

screen = pygame.display.set_mode((800, 500))

pygame.init()

font = pygame.font.SysFont(None, 50)

Places = [Imagination.PLACE(True)]

Game = Imagination.Game(Places[0])

Main_menu = Imagination.Vertical_menu(Places[0], 150)
keyboard = Main_menu.get_keyboard()
keyboard.extend([(pygame.K_ESCAPE, "quit")])

Main_menu.add_option(
    Imagination.text_option(font,
                            "Start", (255, 0, 0),
                            Main_menu,
                            pos_do=Imagination.ch_color((0, 0, 0)),
                            anti_pos_do=Imagination.reset()), True)
Main_menu.add_option(
    Imagination.text_option(font,
                            "Options", (0, 255, 0),
                            Main_menu,
                            pos_do=Imagination.ch_color((0, 0, 0)),
                            anti_pos_do=Imagination.reset()))
Main_menu.add_option(
    Imagination.text_option(font,
Exemplo n.º 4
0
Arquivo: 2.py Projeto: Python3pkg/Mind
from Mind import Imagination
import pygame

screen = pygame.display.set_mode((800, 500))
running = True

pygame.init()

font = pygame.font.SysFont(None, 50)

Main_menu = Imagination.Vertical_menu(Imagination.PLACE(True), 150)
keyboard = Main_menu.get_keyboard()
keyboard.extend([(pygame.K_ESCAPE, "quit")])

Main_menu.add_option(Imagination.text_option(font, "Start", (255, 0, 0), Main_menu, pos_do=Imagination.ch_color((0, 0, 0))), True)
Main_menu.add_option(Imagination.text_option(font, "Options", (0, 255, 0), Main_menu, pos_do=Imagination.ch_color((0, 0, 0))))
Main_menu.add_option(Imagination.text_option(font, "Quit", (0, 0, 255), Main_menu, pos_do=Imagination.ch_color((0, 0, 0))))
Main_menu.set_options()

while running:
    if keyboard.keys["quit"]:
        running = False

    screen.fill((255, 255, 255))

    Main_menu.blit()

    pygame.display.flip()

pygame.quit()
Exemplo n.º 5
0
from Mind import Imagination
import pygame

screen = pygame.display.set_mode((800, 500))

pygame.init()

font = pygame.font.SysFont(None, 50)

Places = [Imagination.PLACE(True)] + [Imagination.PLACE()]

Game = Imagination.Game(Places[0])

keyboard = Imagination.Keyboard(Imagination.ARROWS + Imagination.HIT + Imagination.RETURN + [(pygame.K_ESCAPE, "quit")], 1)
definition = {"type": Imagination.text_option, "font": font, "pos_do": Imagination.joined([Imagination.ch_color((0, 0, 0)), Imagination.ch_pos((10, 0))]), "anti_pos_do": Imagination.reset()}
Game.define(**definition)
declaration = {"type": Imagination.Vertical_menu, "off": (-30, 0), "off_type": "%", "distance": 150, "keyboard": keyboard}
Game.declare(**declaration)

Main_menu = Game.set_from(places=Places[0])

Main_menu.set_from(True, text="Start", color=(255, 0, 0))
Main_menu.set_from(text="Options", color=(0, 255, 0), do=Imagination.link(Places[1]))
Main_menu.set_from(text="Quit", color=(0, 0, 255), do=Imagination.Quit)
Main_menu.set_options()

Options = Game.set_from(places=Places[1], keyboard=keyboard)

Options.set_from(True, type=Imagination.input_option, text="Sound", color=(255, 255, 0))
Options.set_from(text="Back", color=(255, 0, 255), do=Imagination.link(Places[0]))
Options.set_options()
Exemplo n.º 6
0
Arquivo: 6.py Projeto: Python3pkg/Mind
from Mind import Imagination
import pygame

screen = pygame.display.set_mode((800, 500))

pygame.init()

font = pygame.font.SysFont(None, 50)

Places = [Imagination.PLACE(True)] + [Imagination.PLACE()]

Game = Imagination.Game(Places[0])

Main_menu = Imagination.Vertical_menu(Places[0], 150)
keyboard = Main_menu.get_keyboard()
keyboard.extend([(pygame.K_ESCAPE, "quit")])

Main_menu.add_option(Imagination.text_option(font, "Start", (255, 0, 0), Main_menu, pos_do=Imagination.ch_color((0, 0, 0)), anti_pos_do=Imagination.reset()), True)
Main_menu.add_option(Imagination.text_option(font, "Options", (0, 255, 0), Main_menu, Imagination.link(Places[1]), pos_do=Imagination.ch_color((0, 0, 0)), anti_pos_do=Imagination.reset()))
Main_menu.add_option(Imagination.text_option(font, "Quit", (0, 0, 255), Main_menu, Imagination.Quit, pos_do=Imagination.ch_color((0, 0, 0)), anti_pos_do=Imagination.reset()))
Main_menu.set_options()

Main_menu.set_game(Game)

Options = Imagination.Vertical_menu(Places[1], 150, keyboard=keyboard)
Options.add_option(Imagination.text_option(font, "Sound", (255, 255, 0), Options, pos_do=Imagination.ch_color((0, 0, 0)), anti_pos_do=Imagination.reset()), True)
Options.add_option(Imagination.text_option(font, "Back", (255, 0, 255), Options, Imagination.link(Places[0]), pos_do=Imagination.ch_color((0, 0, 0)), anti_pos_do=Imagination.reset()))
Options.set_options()

Options.set_game(Game)
Exemplo n.º 7
0
Arquivo: 1.py Projeto: Knowlege/Mind
from Mind import Imagination
import pygame

screen = pygame.display.set_mode((800, 500))
running = True

pygame.init()

font = pygame.font.SysFont(None, 50)

Main_menu = Imagination.Vertical_menu(Imagination.PLACE(True), 150)
keyboard = Main_menu.get_keyboard()
keyboard.extend([(pygame.K_ESCAPE, "quit")])

Main_menu.add_option(Imagination.text_option(font, "Start", (255, 0, 0), Main_menu), True)
Main_menu.add_option(Imagination.text_option(font, "Options", (0, 255, 0), Main_menu))
Main_menu.add_option(Imagination.text_option(font, "Quit", (0, 0, 255), Main_menu))
Main_menu.set_options()

while running:
    if keyboard.keys["quit"]:
        running = False

    screen.fill((255, 255, 255))

    Main_menu.blit()

    pygame.display.flip()

pygame.quit()
Exemplo n.º 8
0
import pygame
from Mind import Imagination

screen = pygame.display.set_mode((500, 500))

pygame.init()

printer = Imagination.printer(20, 30, pygame.font.SysFont("Arial", 30), 30)

print("Hello world!", file=printer)
print("How are you?", file=printer)

running = True
while running:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False

    screen.fill((255, 255, 255))

    printer.blit()

    pygame.display.update()

pygame.quit()
Exemplo n.º 9
0
Arquivo: 8.py Projeto: Python3pkg/Mind
from Mind import Imagination
import pygame

screen = pygame.display.set_mode((800, 500))

pygame.init()

font = pygame.font.SysFont(None, 50)

Places = [Imagination.PLACE(True)] + [Imagination.PLACE()]

Game = Imagination.Game(Places[0])

definition = {
    "type":
    Imagination.text_option,
    "font":
    font,
    "pos_do":
    Imagination.joined(
        [Imagination.ch_color((0, 0, 0)),
         Imagination.ch_pos((10, 0))]),
    "anti_pos_do":
    Imagination.reset()
}
Game.define(**definition)

Main_menu = Imagination.Vertical_menu(Places[0],
                                      150,
                                      off=(-30, 0),
                                      off_type="%")
Exemplo n.º 10
0
Arquivo: 7.py Projeto: Python3pkg/Mind
from Mind import Imagination
import pygame

screen = pygame.display.set_mode((800, 500))

pygame.init()

font = pygame.font.SysFont(None, 50)

Places = [Imagination.PLACE(True)] + [Imagination.PLACE()]

Game = Imagination.Game(Places[0])

definition = {"type": Imagination.text_option, "font": font, "pos_do": Imagination.ch_color((0, 0, 0)), "anti_pos_do": Imagination.reset()}
Game.define(**definition)

Main_menu = Imagination.Vertical_menu(Places[0], 150)
keyboard = Main_menu.get_keyboard()
keyboard.extend([(pygame.K_ESCAPE, "quit")])

Main_menu.set_game(Game)

Main_menu.set_from(True, text="Start", color=(255, 0, 0))
Main_menu.set_from(text="Options", color=(0, 255, 0), do=Imagination.link(Places[1]))
Main_menu.set_from(text="Quit", color=(0, 0, 255), do=Imagination.Quit)
Main_menu.set_options()

Options = Imagination.Vertical_menu(Places[1], 150, keyboard=keyboard)

Options.set_game(Game)
Exemplo n.º 11
0
from Mind import Imagination
import pygame

screen = pygame.display.set_mode((800, 500))

pygame.init()

font = pygame.font.SysFont(None, 50)

Places = [Imagination.PLACE(True)] + [Imagination.PLACE()]

Game = Imagination.Game(Places[0])

definition = {
    "type":
    Imagination.text_option,
    "font":
    font,
    "pos_do":
    Imagination.joined(
        [Imagination.ch_color((0, 0, 0)),
         Imagination.ch_pos((10, 0))]),
    "anti_pos_do":
    Imagination.reset()
}
Game.define(**definition)
declaration = {
    "type": Imagination.Vertical_menu,
    "off": (-30, 0),
    "off_type": "%",
    "distance": 150