質問 (回答受付中)[artisocモデル] 指定した色にならない | |
質問者: 16e0140121さん , 質問日時: 2017/08/30 16:40 |
Agtstepでcyanとmazentaに指定しているのに,universe step endでもcolorを同じように設定していますが,mazentaだけ黒になります. Agt_Step{ If My.strategy == 0 Then //AllC My.move = 0 Elseif My.strategy == 1 Then //AllD My.move = 1 Else My.move = Certainrule(one) End if
If My.move == 0 Then My.color = Color_Cyan Else My.color = Color_Mazenta End if
}
Function Certainrule(person As Agt) As Integer{ Dim action As Integer
If GetCountStep() == 1 Then action = Round(Rnd()) Else action = 0 End if Return(action)
}
Univ_Step_End{ Dim set As Agtset Dim one As Agt Dim colorCyan As Integer Dim colorMazenta As Integer colorCyan = 0 colorMazenta = 0 MakeAgtset(set, Universe.Field.player) For each one in set If one.color == Color_Cyan Then colorCyan = colorCyan + 1 Elseif one.color == Color_Mazenta Then one.color = ColorMazenta + 1 End if Next one
If colorCyan == 30 Then ExitSimulation() End if
} Univ_Step_Endでmazentaを設定したところ,mazentaの部分だけ黒くなります.
|
|
▼ 全ての回答
|
|