Saturday, April 30, 2011

Python program

Ive spent that last couple of days (inbetween my exams) playing around with python and learning about what sort of stuff it could do. Turns out it has the ability to write to a .wav file. so what did i do? wrote out a song. First on the guess what it is wins!
Please note that this is written in Python 3.0
Code

Thursday, April 28, 2011

Featured on the Vuzix twitter page!

Just wanted to say thanks to vuzix for retweeting my site's link to my review! If your interested on the best virtual reality glasses head over to their site!

The Tardis in full size

This month im hoping to build one. Anyone who donates 1$ or more gets their name on the sponsors plaque on the inside. Going to build it full size to scale to the 2005-present prop with accurate look and interior as well as the noise and flashing light.

Tuesday, April 26, 2011

Bought the Vuzix Wrap920

So a little while ago I finally bought those damned glasses. Dropped 400$ from my bank account and 2 days later there they were. Being the excitable person that i am i stood in the mail-room and tore off the packaging before rushing upstairs to try them out. And i was shocked at the quality. The focus dials are a little hard to get at first and the first few times using text may take a little bit to focus but now my eyes are fully trained and its like having a personal movie theater in my pocket. I don't know if I'm just seeing it weird but the screen looks a hell of a lot bigger than the advertised 60 inches. Currently i only have the iPod and composite connections but i cant wait for them to bring out the HDMI cable later this spring.
Pros:
-Awesome TV in my pocket
-Works with everything i own besides laptop(until i get the HDMI cable)
-Can now own people in reach while laying in bed
-Don't have to lay awkwardly in bed while watching TV; The screen rotates to fit you
Cons:
-Only thing i have it that it sticks out from my face more than the pictures make it appear. But not a big issue as i don't much care what i look like because the glasses are just that badass
Overall I'm going to give them a 9.7/10. If your even slightly interested in being cool id suggesting heading over to The Vuzix Website and checking out a pair of your own.

Python is fun!

Hey everyone (who's left that is) Sorry for the long long long delay in posting. Lately(and by lately i mean the past 2 hours) I've been teaching myself python. It started when i found Skulpt a nifty live, in-browser compiler for Python. Since then I've downloaded the IDE for windows and have been playing with it. So far I've written the beginnings of a Blackjack game but lost myself in how to equate the card names to values because i stored the cards in a map. Tomorrow i might start on a MTG program that would take your deck, shuffle it, draw a hand and keep track of mana etc. All command line based of course since Clarkson doesn't teach GUI applications (yet i hope). Anyways below is the code I have so far. Feel free to provide suggestions.
-----------------------------------
| Read no Further if you don't care |
-----------------------------------

import random



deck = {1 : 'Ace of Hearts', 2:'Ace of Clubs',   3:'Ace of Spades',   4:'Ace of Diamonds',

        5:'Two of Hearts',   6:'Two of Clubs',   7:'Two of Spades',   8:'Two of Diamonds',

        9:'Three of Hearts', 10:'Three of Clubs',11:'Three of Spades',12:'Three of Diamonds',

        13:'Four of Hearts', 14:'Four of Clubs', 15:'Four of Spades', 16:'Four of Diamonds',

        17:'Five of Hearts', 18:'Five of Clubs', 19:'Five of Spades', 20:'Five of Diamonds',

        21:'Six of Hearts',  22:'Six of Clubs',  23:'Six of Spades',  24:'Six of Diamonds',

        25:'Seven of Hearts',26:'Seven of Clubs',27:'Seven of Spades',28:'Seven of Diamonds',

        29:'Eight of Hearts',30:'Eight of Clubs',31:'Eight of Spades',32:'Eight of Diamonds',

        33:'Nine of Hearts', 34:'Nine of Clubs', 35:'Nine of Spades', 36:'Nine of Diamonds',

        37:'Ten of Hearts',  38:'Ten of Clubs',  39:'Ten of Spades',  40:'Ten of Diamonds',

        41:'Jack of Hearts', 42:'Jack of Clubs', 43:'Jack of Spades', 44:'Jack of Diamonds',

        45:'Queen of Hearts',46:'Queen of Clubs',47:'Queen of Spades',48:'Queen of Diamonds',

        49:'King of Hearts', 50:'King of Clubs', 51:'King of Spades', 52:'King of Diamonds'}



hand = []

total = 0



def start():

    m=random.randint(1,52)

    hand.append(deck[m])

total = 0

def checkHand():

    #To be implemented        

    

def dealing(answer):

    if answer == "HIT":

        m=random.randint(1,52)

        hand.append(deck[m])

        checkHand()

        print(hand, total)

        response = input("Would you like to hit or stay? (Please note the Dealer sticks at 16) HIT/STAY \n")

        dealing(response)

    if answer == "STAY":

        return

    else:

        print("Invalid Response...Quiting")

        return



print("Hello and welcome to BlackJack 2011. Here are your first two cards: " )

start()

start()

checkHand()

print(hand,total)

response = input("Would you like to hit or stay? (Please note the Dealer sticks at 16) HIT/STAY \n")

dealing(response)

print(hand,total)