def values(main_screen): main_screen.fill((255,255,255)) myfont = pygame.font.SysFont("ComicSansMS", 48) label = myfont.render("Pick a value:", 1, (11,46,7)) main_screen.blit(label, (100, 20)) global button button=buttonclass.button(115, 70,20,100) button.draw(main_screen) myfont = pygame.font.SysFont("ComicSansMS", 18) label = myfont.render(" Lead by example", 1, (11,206,7)) main_screen.blit(label, (22, 120)) global button2 button2=buttonclass.button(115, 70,300,100) button2.draw(main_screen) myfont = pygame.font.SysFont("ComicSansMS", 18) label = myfont.render("Equality", 1, (11,206,7)) main_screen.blit(label, (330, 120)) global button3 button3=buttonclass.button(115, 70,165,240) button3.draw(main_screen) myfont = pygame.font.SysFont("ComicSansMS", 18) label = myfont.render("Team work", 1, (11,206,7)) main_screen.blit(label, (180, 265)) global finishb finishb=buttonclass.button(100,50,320,320) finishb.draw(main_screen) myfont = pygame.font.SysFont("ComicSansMS", 18) label = myfont.render("Finish", 1, (11,206,7)) main_screen.blit(label, (340, 340))
def __init__(self, currentNum): size = [800, 600] screen = pygame.display.set_mode(size) pygame.display.set_caption("Arcade City") clock = pygame.time.Clock() background = pygame.image.load("mainscreen.png").convert() screen.blit(background, [0,0]) caption = pygame.image.load("caption.png").convert() instructgirlimg = pygame.image.load("instructgirl.png").convert() instructgirl = pygame.transform.scale(instructgirlimg, (200, 200)) instructgirl.set_colorkey(black) screen.blit(instructgirl, [70, 90]) titleText = pygame.font.SysFont('Showcard Gothic', 60) subText = pygame.font.SysFont('Showcard Gothic', 25) buttonText = pygame.font.SysFont('Showcard Gothic', 30) title = titleText.render("Higher or Lower", True, white) screen.blit(title, [140, 50]) screen.blit(caption, [3, 280]) pygame.draw.rect(screen, white, (45, 300, 670, 110)) higherButton = button(screen, blue, 150, 450, 150, 50) lowerButton = button(screen, blue, 515, 450, 150, 50) backButton = button(screen, bright_red, 330, 525, 150, 50) line1 = subText.render(("My number is " + str(currentNum) + "."), True, black) line2 = subText.render("Will my next number be higher or lower?", True, black) screen.blit(line1, [50, 300]) screen.blit(line2, [50, 330]) higherText = buttonText.render("Higher", True, white) lowerText = buttonText.render("Lower", True, white) backText = buttonText.render("Back", True, white) screen.blit(higherText, [166, 460]) screen.blit(lowerText, [535, 460]) screen.blit(backText, [365, 535]) pygame.display.update() clock.tick(60)
def __init__(self): size = [800, 600] screen = pygame.display.set_mode(size) pygame.display.set_caption("Arcade City") clock = pygame.time.Clock() background = pygame.image.load("rockpaperscissorsbg.png").convert() screen.blit(background, [0, 0]) subText = pygame.font.SysFont('Showcard Gothic', 50) smallText = pygame.font.SysFont('Showcard Gothic', 20) midText = pygame.font.SysFont('Showcard Gothic', 30) title = subText.render("Rock, Paper, or Scissors?", True, blue) screen.blit(title, [80, 100]) rockButton = button(screen, green, 130, 450, 150, 50) paperButton = button(screen, green, 330, 450, 150, 50) scissorsButton = button(screen, green, 530, 450, 150, 50) backButton = button(screen, bright_red, 330, 525, 150, 50) rock = smallText.render("Rock", True, white) screen.blit(rock, [180, 465]) paper = smallText.render("Paper", True, white) screen.blit(paper, [373, 465]) scissors = smallText.render("Scissors", True, white) screen.blit(scissors, [563, 465]) back = smallText.render("Back", True, white) screen.blit(back, [380, 540]) pygame.display.update() clock.tick(60)
def Teamwork(main_screen): myfont = pygame.font.SysFont("ComicSansMS", 48) label = myfont.render("Lead by example", 1, (11,46,7)) main_screen.blit(label, (5, 20)) global button9 button9=buttonclass.button(155, 70,15,100) button9.draw(main_screen) button9.button_su.fill((205, 92, 92)) myfont = pygame.font.SysFont("ComicSansMS", 18) label = myfont.render("Work with ", 1, (11,206,7)) label2 = myfont.render("childern ", 1, (11,206,7)) main_screen.blit(label, (28, 120)) main_screen.blit(label2, (28, 140)) label3 = myfont.render("100$", 1, (11,206,7)) main_screen.blit(label3, (35, 180)) global button10 button10=buttonclass.button(150, 70,230,100) button10.draw(main_screen) button10.button_su.fill((205, 92, 92)) myfont = pygame.font.SysFont("ComicSansMS", 18) label = myfont.render("Travel guide", 1, (11,206,7)) main_screen.blit(label, (240, 120)) label3 = myfont.render("100$", 1, (11,206,7)) main_screen.blit(label3, (260, 180))
def equality(main_screen): myfont = pygame.font.SysFont("ComicSansMS", 48) label = myfont.render("Equality", 1, (11,46,7)) main_screen.blit(label, (5, 20)) global button5 button5=buttonclass.button(155, 70,25,100) button5.draw(main_screen) button5.button_su.fill((205, 92, 92)) myfont = pygame.font.SysFont("ComicSansMS", 18) label = myfont.render("Work with people ", 1, (11,206,7)) label2 = myfont.render("from another nationality ", 1, (11,206,7)) main_screen.blit(label, (28, 120)) main_screen.blit(label2, (28, 140)) label3=myfont.render("50$",1,(11,206,7)) main_screen.blit(label3, (35, 180)) global button6 button6=buttonclass.button(150, 70,230,100) button6.draw(main_screen) button6.button_su.fill((205, 92, 92)) myfont = pygame.font.SysFont("ComicSansMS", 18) label = myfont.render("Work with old people", 1, (11,206,7)) main_screen.blit(label, (240, 120)) label3=myfont.render("50$",1,(11,206,7)) main_screen.blit(label3, (250, 180))
def __init__(self): size = [800, 600] screen = pygame.display.set_mode(size) pygame.display.set_caption("Arcade City") clock = pygame.time.Clock() background = pygame.image.load("mainscreen.png").convert() screen.blit(background, [0, 0]) caption = pygame.image.load("caption.png").convert() instructgirlimg = pygame.image.load("instructgirl.png").convert() instructgirl = pygame.transform.scale(instructgirlimg, (200, 200)) instructgirl.set_colorkey(black) screen.blit(instructgirl, [70, 110]) titleText = pygame.font.SysFont('Showcard Gothic', 60) subText = pygame.font.SysFont('Showcard Gothic', 25) text = titleText.render("Instructions", True, white) captionText = subText.render("Hey! Welcome to Arcade City! Start by clicking the", True, black) captionText2 = subText.render("first building to play Rock, Paper, Scissors and", True, black) captionText3 = subText.render("rack up tickets. Then, when you get 300 tickets,", True, black) captionText4 = subText.render("Higher or Lower is unlocked. Have fun!", True, black) screen.blit(text, [200, 80]) playButton = button(screen, green, 325, 500, 150, 50) buttonText = pygame.font.SysFont('Showcard Gothic', 30) screen.blit(caption, [3, 300]) pygame.draw.rect(screen, white, (45, 320, 670, 110)) screen.blit(captionText, [45, 325]) screen.blit(captionText2, [45, 350]) screen.blit(captionText3, [45, 375]) screen.blit(captionText4, [45, 400]) play = buttonText.render("Play!", True, white) screen.blit(play, [357, 515]) pygame.display.update() clock.tick(60)
def XperienceValues(main_screen): main_screen.fill((255,255,255)) global myfont myfont = pygame.font.SysFont("ComicSansMS", 56) global label label = myfont.render("X", 1, (11,46,7)) main_screen.blit(label, (120, 20)) myfont = pygame.font.SysFont("ComicSansMS", 52) label = myfont.render("perience", 1, (11,206,7)) main_screen.blit(label, (145, 20)) myfont = pygame.font.SysFont("ComicSansMS", 52) label = myfont.render("Values", 1, (11,46,7)) main_screen.blit(label, (135, 62)) global valuesbutton valuesbutton=buttonclass.button(130, 130,125,140) valuesbutton.draw(main_screen) myfont = pygame.font.SysFont("ComicSansMS",60) label = myfont.render("=>", 1, (11,206,7)) main_screen.blit(label, (160, 180))
def __init__(self): size = [800, 600] screen = pygame.display.set_mode(size) pygame.display.set_caption("Arcade City") clock = pygame.time.Clock() background = pygame.image.load("mainscreen.png").convert() screen.blit(background, [0, 0]) pygame.mixer.music.load("music.mp3") pygame.mixer.music.play(loops=-1) pygame.mixer.music.set_volume(0.5) titleText = pygame.font.SysFont('Showcard Gothic', 60) subText = pygame.font.SysFont('Showcard Gothic', 20) text = titleText.render("Arcade City", True, white) cs = subText.render("CS110 Final Project", True, white) names = subText.render( "Aidan Uy, Crystal Low, Danika Gaviola, Dylan Pan", True, white) screen.blit(text, [218, 200]) screen.blit(cs, [310, 265]) screen.blit(names, [150, 290]) startButton = button(screen, green, 330, 400, 150, 50) buttonText = pygame.font.SysFont('Showcard Gothic', 30) start = buttonText.render("Start!", True, white) screen.blit(start, [353, 410]) ticketReset = open("tickets.txt", "w") ticketReset.write("0") ticketReset.close() pygame.display.update() clock.tick(60)
import labels import sys def clear(): main_screen.fill((255, 255, 255)) if __name__=="__main__": pg.init() main_screen = pg.display.set_mode((600, 600)) main_screen.fill((255,255,255)) image1=imagesclass.image(50, 500, "pygame_tiny.png") image1.draw_image(main_screen) button1=buttonclass.button(200, 300, 200, 60, "Enter", 90, (0, 191, 255)) buttonclass.button.draw_button(button1, main_screen) print "" label1 = labels.label((123,43,200), 200, 200, 40, 100, "Welcome To Sweet Dreams", 60) label1.draw_label(main_screen) button_cmain=buttonclass.button(50000, 35000, 200, 100, "Cakes", 94, (0, 191, 255)) buttonclass.button.draw_button(button_cmain, main_screen) button_icmain=buttonclass.button(5000, 35000, 200, 100, "Cakes", 94, (0, 191, 255)) buttonclass.button.draw_button(button_icmain, main_screen) numcc = 0 numvc = 0 numsc = 0 numcic = 0 numvic = 0
def __init__(self, currentNum): size = [800, 600] screen = pygame.display.set_mode(size) pygame.display.set_caption("Arcade City") clock = pygame.time.Clock() background = pygame.image.load("mainscreen.png").convert() screen.blit(background, [0, 0]) caption = pygame.image.load("caption.png").convert() instructgirlimg = pygame.image.load("instructgirl.png").convert() instructgirl = pygame.transform.scale(instructgirlimg, (200, 200)) instructgirl.set_colorkey(black) screen.blit(instructgirl, [70, 90]) newNum = random.randrange(30) titleText = pygame.font.SysFont('Showcard Gothic', 60) subText = pygame.font.SysFont('Showcard Gothic', 25) buttonText = pygame.font.SysFont('Showcard Gothic', 30) text = titleText.render("Higher or Lower", True, white) screen.blit(text, [140, 50]) screen.blit(caption, [3, 280]) pygame.draw.rect(screen, white, (45, 300, 670, 110)) backButton = button(screen, blue, 330, 475, 150, 50) backText = buttonText.render("Back", True, white) screen.blit(backText, [365, 485]) winText = subText.render(("Correct! The number was " + str(newNum) + ". Here are your tickets."), True, black) loseText = subText.render(("You lost. The number was " + str(newNum) + ". Try again later!"), True, black) if newNum <= currentNum: screen.blit(winText, [50, 300]) tickWin = 10 ticketFile = open("tickets.txt", "r") tickets = ticketFile.read() tickets = int(tickets) + tickWin if tickets <= 0: tickets = 0 elif tickets >= 1000: tickets = 1000 ticketFile.close() ticketUpdate = open("tickets.txt", "w") ticketUpdate.write(str(tickets)) ticketUpdate.close() elif newNum > currentNum: screen.blit(loseText, [50, 300]) tickLose = -5 ticketFile = open("tickets.txt", "r") tickets = ticketFile.read() tickets = int(tickets) + tickLose if tickets <= 0: tickets = 0 elif tickets >= 1000: tickets = 1000 ticketFile.close() ticketUpdate = open("tickets.txt", "w") ticketUpdate.write(str(tickets)) ticketUpdate.close() pygame.display.update() clock.tick(60)
import buttonclass import labels import sys def clear(): main_screen.fill((255, 255, 255)) if __name__ == "__main__": pg.init() main_screen = pg.display.set_mode((600, 600)) main_screen.fill((255, 255, 255)) image1 = imagesclass.image(50, 500, "pygame_tiny.png") image1.draw_image(main_screen) button1 = buttonclass.button(200, 300, 200, 60, "Enter", 90, (0, 191, 255)) buttonclass.button.draw_button(button1, main_screen) print "" label1 = labels.label((123, 43, 200), 200, 200, 40, 100, "Welcome To Sweet Dreams", 60) label1.draw_label(main_screen) button_cmain = buttonclass.button(50000, 35000, 200, 100, "Cakes", 94, (0, 191, 255)) buttonclass.button.draw_button(button_cmain, main_screen) button_icmain = buttonclass.button(5000, 35000, 200, 100, "Cakes", 94, (0, 191, 255)) buttonclass.button.draw_button(button_icmain, main_screen) numcc = 0 numvc = 0
button8.button_su.fill((205, 92, 92)) myfont = pygame.font.SysFont("ComicSansMS", 18) label = myfont.render("Travel guide", 1, (11,206,7)) main_screen.blit(label, (240, 120)) label3 = myfont.render("75$", 1, (11,206,7)) main_screen.blit(label3, (260, 180)) if __name__=="__main__": pygame.init() main_screen = pygame.display.set_mode((430, 400)) main_screen.fill((255,255,255)) XperienceValues(main_screen) screenname="main" global backbutton backbutton=buttonclass.button(50,50,15,340) price = 0 while True: ev = pygame.event.poll() if ev.type == pygame.MOUSEBUTTONDOWN: x, y = ev.pos if valuesbutton.button_rec.collidepoint(x, y): screenname="mainvalues" values(main_screen) if screenname=="mainvalues": if button.button_rec.collidepoint(x, y): main_screen.fill((255,255,255))
import pygame import buttonclass if __name__=="__main__": pygame.init() main_screen = pygame.display.set_mode((400, 400)) main_screen.fill((255,255,255)) myfont = pygame.font.SysFont("ComicSansMS", 48) label = myfont.render("Lead by example:", 1, (11,46,7)) main_screen.blit(label, (5, 20)) button7=buttonclass.button(155, 70,15,100) button7.draw(main_screen) button7.button_su.fill((205, 92, 92)) myfont = pygame.font.SysFont("ComicSansMS", 18) label = myfont.render("Work with ", 1, (11,206,7)) label2 = myfont.render("childern ", 1, (11,206,7)) main_screen.blit(label, (28, 120)) main_screen.blit(label2, (28, 140)) button8=buttonclass.button(150, 70,230,100) button8.draw(main_screen) button8.button_su.fill((205, 92, 92)) myfont = pygame.font.SysFont("ComicSansMS", 18) label = myfont.render("Travel guide", 1, (11,206,7)) main_screen.blit(label, (240, 120))
#label = orderlabel.render(Context, 1, FontColor, BackgroundColor) #main_screen.blit(label, label_rec) if __name__=="__main__": pygame.init() main_screen = pygame.display.set_mode((600,600)) main_screen.fill((255,153,153)) myfont = pygame.font.SysFont("times new roman",40) label = myfont.render("price",1,(200, 28, 150)) main_screen.blit(label, (5,20)) button1 = buttonclass.button(12,50,78,45) button1.draw(main_screen) button1.button_su.fill((120, 57, 139)) myfont = pygame.font.sysfont("times new roman",40) label = myfont.render("choclate",1,(200, 28, 150)) while True: ev = pygame.event.poll() pygame.display.flip()
def __init__(self): size = [800, 600] screen = pygame.display.set_mode(size) pygame.display.set_caption("Arcade City") clock = pygame.time.Clock() background = pygame.image.load("rockpaperscissorsbg.png").convert() screen.blit(background, [0, 0]) from random import randint t = ["Rock", "Paper", "Scissors"] computer = t[randint(0, 2)] subText = pygame.font.SysFont('Showcard Gothic', 50) smallText = pygame.font.SysFont('Showcard Gothic', 20) midText = pygame.font.SysFont('Showcard Gothic', 30) player = "Rock" if computer == "Rock": cs = midText.render("Tie!", True, blue) screen.blit(cs, [385, 260]) if computer == "Paper": cs = midText.render("You lose! Paper covers rock.", True, blue) screen.blit(cs, [165, 260]) tickLose = -10 ticketFile = open("tickets.txt", "r") tickets = ticketFile.read() tickets = int(tickets) + tickLose if tickets <= 0: tickets = 0 elif tickets >= 1000: tickets = 1000 ticketFile.close() ticketUpdate = open("tickets.txt", "w") ticketUpdate.write(str(tickets)) ticketUpdate.close() if computer == "Scissors": cs = midText.render("You win! Rock smashes scissors.", True, blue) screen.blit(cs, [165, 260]) tickWin = 30 ticketFile = open("tickets.txt", "r") tickets = ticketFile.read() tickets = int(tickets) + tickWin if tickets <= 0: tickets = 0 elif tickets >= 1000: tickets = 1000 ticketFile.close() ticketUpdate = open("tickets.txt", "w") ticketUpdate.write(str(tickets)) ticketUpdate.close() backButton = button(screen, green, 343, 411, 150, 50) backText = midText.render("Back", True, white) screen.blit(backText, [380, 426]) pygame.display.update() clock.tick(60)
import pygame import buttonclass if __name__=="__main__": pygame.init() main_screen = pygame.display.set_mode((400, 400)) main_screen.fill((255,255,255)) myfont = pygame.font.SysFont("ComicSansMS", 48) label = myfont.render("Equality", 1, (11,46,7)) main_screen.blit(label, (5, 20)) button5=buttonclass.button(155, 70,25,100) button5.draw(main_screen) button5.button_su.fill((205, 92, 92)) myfont = pygame.font.SysFont("ComicSansMS", 18) label = myfont.render("Work with people ", 1, (11,206,7)) label2 = myfont.render("from another nationality ", 1, (11,206,7)) main_screen.blit(label, (28, 120)) main_screen.blit(label2, (28, 140)) button6=buttonclass.button(150, 70,230,100) button6.draw(main_screen) button6.button_su.fill((205, 92, 92)) myfont = pygame.font.SysFont("ComicSansMS", 18) label = myfont.render("Work with old people", 1, (11,206,7)) main_screen.blit(label, (240, 120))
import pygame import buttonclass if __name__=="__main__": pygame.init() main_screen = pygame.display.set_mode((400, 400)) main_screen.fill((255,255,255)) myfont = pygame.font.SysFont("ComicSansMS", 48) label = myfont.render("Embrace team work: ", 1, (11,46,7)) main_screen.blit(label, (5, 20)) button9=buttonclass.button(155, 70,20,100) button9.draw(main_screen) button9.button_su.fill((205, 92, 92)) myfont = pygame.font.SysFont("ComicSansMS", 18) label = myfont.render("playing team ", 1, (11,206,7)) label2 = myfont.render("sport ", 1, (11,206,7)) main_screen.blit(label, (28, 120)) main_screen.blit(label2, (28, 140)) button10=buttonclass.button(150, 70,230,100) button10.draw(main_screen) button10.button_su.fill((205, 92, 92)) myfont = pygame.font.SysFont("ComicSansMS", 18) label = myfont.render("Work with people", 1, (11,206,7)) main_screen.blit(label, (240, 120))