Sunday
10May2009
Wow...I'm a nerd...
Sunday, May 10, 2009 at 6:09PM For anyone else who has gotten tired of mucking around with Fallout 3's stupid hacking challanges, here's your salvation:
words = {
"persevered": 1,
"domination": -1,
"resembling": -1,
"generation": 3,
"resounding": 2,
"definition": -1,
"adrenaline": -1,
"definitely": -1,
"reputation": -1,
"revolution": -1,
"meditation": -1,
"separating": -1,
"recuperate": -1}
def compare( one, two ):
equal = 0
for i in range(0,len(one)):
if( one[i] == two[i] ):
equal = equal + 1
return equal
known_words = filter( lambda x: words[x] >= 0, words.keys() )
unknown_words = filter( lambda x: words[x] == -1, words.keys() )
possible_words = []
for word in unknown_words:
valid = 1
for check in known_words:
if( compare( word, check ) != words[check] ):
valid = 0
if( valid == 1 ):
possible_words.append(word)
print possible_words
I'll clean this up and make it a nice gui app at some point.
Robert Ward | Comments Off | tagged
code python geek gaming
code python geek gaming 