Skip to content
Menu
Daniel J. Pierce
  • C#
  • Games
  • Graphics
  • Math
  • Python
  • Tynker
  • Unity
Daniel J. Pierce

Portals

Posted on October 18, 2018November 10, 2019
import random
game = True
def main():
    dimensions = ['Candyland', 'Aether', 'Skylands', 'Caves', 'Fireworld', 'Underwater', 'Fruityland']
    WL = {'Candyland': 1, 'Aether': 1, 'Skylands': 1, 'Fireworld': 0, 'Underwater': 0, 'Fruityland': 1, 'Caves': 0}
    print('''You can chose any number from 1 to ''' + str(len(dimensions)) + ' That number will chose the dimension, but the order shown below is not correct')
    for i in dimensions:
        print(i)
    x = input('in> ')
    try:
        x = int(x)
    except:
        print("You have to eneter a number")
        main()
        return False
    if x < 1 or x > len(dimensions):
        print("The number you have to eneter has to be between 1 and " + str(len(dimensions)))
    dimensions = dimensions
    random.shuffle(dimensions)
    print("You went to " + dimensions[int(x)])
    if WL[dimensions[int(x)]] == 1:
        print("You Won!")
    else:
        print("You Lost!")
    
about = 'Guess a correct portal number to win'
    
if __name__ == '__main__':
    main()

Projects

  • Procedure Platforming
  • Particle Simulator
  • AP Computer Science Paint Program
  • Maybe Good Platformer
  • Custom Gravity Test
  • Triangle Types
  • Unity Obstacle Course v1
  • Collapsing rows
  • Java Tic Tac Toe (No AI)
  • Mersenne Prime Tester
  • Rainbow
  • Pong
  • Simple Tkinter Calculator
  • Hexidecimal Converter
  • Snake eats apple
  • Protect the Galactic Empire
  • Hangman
  • Beautiful Colorful Thing
  • Four Dots
  • Frogga
  • Escape asteroids
  • Portals
  • Guess the Number 2.0
  • Illogical
  • Tic Tac Toe
  • Guess the Number
  • Ultimate Calculator 1.0.0a0
  • Prime Number Tester
  • Number Base Converter 2.0a0
  • Number Base Converter 1.1
  • Python Equation Calculator
©2025 Daniel J. Pierce | WordPress Theme by Superb WordPress Themes