import numpy as np
def paint():
print("***********")
for i in range(29):
if x[i]>-1:
print(sta[i]+","+str(x[i]))
def dice():
d=[1,2,3,4,5,6]
n1 =np.random.choice(d)
return n1
sta=[]
sta.append("東京駅")
sta.append("神田駅")
sta.append("秋葉原駅")
sta.append("御徒町駅")
sta.append("上野駅")
sta.append("鶯谷駅")
sta.append("日暮里駅")
sta.append("西日暮里駅")
sta.append("田端駅")
sta.append("駒込駅")
sta.append("巣鴨駅")
sta.append("大塚駅")
sta.append("池袋駅")
sta.append("目白駅")
sta.append("高田馬場駅")
sta.append("新大久保駅")
sta.append("新宿駅")
sta.append("代々木駅")
sta.append("原宿駅")
sta.append("渋谷駅")
sta.append("恵比寿駅")
sta.append("目黒駅")
sta.append("五反田駅")
sta.append("大崎駅")
sta.append("品川駅")
sta.append("田町駅")
sta.append("浜松町駅")
sta.append("新橋駅")
sta.append("有楽町駅")
x=[]
for i in range(29):
x.append(-1)
m=[1000,1000,1000,1000]
a=[1,1,1,1]
mode=4
game=3
while game<1000:
game=game+1
mode=mode+1
if mode>3:
mode=0
a[mode]=a[mode]+dice()
if a[mode]>27:
a[mode]=a[mode]-27
x1=a[mode]
sig=x[x1]
if sig>-1:
m[sig]=m[sig]+10
m[mode]=m[mode]-10
if sig==-1:
m[mode]=m[mode]-100
x[x1]=mode
for i in range(4):
if m[i]<0:
game=11111
paint()
最終更新:2018年01月28日 18:33