Created
May 1, 2015 15:53
-
-
Save tanishiking/eacd90819fa410e5adf7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
class ManagerCreator(object): | |
u"""プリパラマイマネ問題検証用スクリプト""" | |
color = [u'赤', u'橙', u'黄', u'緑', u'水', u'青', u'紫'] | |
animal = [u'熊', u'兎', u'鳥', u'鼠', u'猫'] | |
def get_manager(self, name): | |
uni_code_point = ord(name) | |
ani, col = divmod(uni_code_point % 35, 7) | |
return (self.animal[ani], self.color[col]) | |
if __name__ == '__main__': | |
creator = ManagerCreator() | |
list_of_hiragana = [unichr(i) for i in range(ord(u"あ"), ord(u"ん")+1)] | |
for char in list_of_hiragana: | |
animal, color = creator.get_manager(char) | |
print "%s: %s %s" % (char, color, animal) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment