老师的图画的很清楚了,每对颜色的路线就是相反方向的路线,
S2N("N2S","S2W",false),S2W("N2E","E2W",false),E2W("W2E","E2S",false),E2S("W2N","S2N",false),
/*下面元素表示与上面的元素的相反方向的灯,它们的“相反方向灯”和“下一个灯”应忽略不计!*/
N2S(null,null,false), N2E(null,null,false), W2E(null,null,false), W2N(null,null,false),
右拐弯不受红绿灯的控制不考虑,把剩下的8路线分为对应的四组,直,弯,直,弯,四组轮着来 |