$ct1=int(rand(20))+40; $ct2=int(rand(20))+40; $ct3=int(rand(20))+40; $ct4=int(rand(20))+40; $ct5=int(rand(20))+40; # 友好度 初期化 for ($self=1; $self<6;$self++){ for ($other=1; $other<6;$other++){ $cfs[$self.$other] = $CP{'cfs'.$self.$other}; if ($other<$self){ # ランダム $cfs[$self.$other] = int(rand(30)+40); # 固定値 # $cfs[$self.$other] = 50; } elsif ($other>$self) { $cfs[$self.$other] = 0; } # clear #$cfs[$self.$other] = ""; } } |