|
@@ -215,19 +215,19 @@ export class CarCarColorsSysterm extends Component {
|
|
|
});
|
|
|
|
|
|
// 检查可开出的车中是否至少有一个车的颜色是待解锁的钉子颜色之一
|
|
|
- let hasValidColor = false;
|
|
|
- canOutCar.forEach(car => {
|
|
|
- if (topPins.has(car.carColor)) {
|
|
|
- hasValidColor = true;
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- if (!hasValidColor && canOutCar.length > 0) {
|
|
|
- // 如果没有符合条件的车,将第一个可开出的车的颜色改为待解锁的钉子颜色之一
|
|
|
- const firstCar = canOutCar[0];
|
|
|
- const newColor = Array.from(topPins)[0]; // 取第一个待解锁的颜色
|
|
|
- firstCar.carColor = newColor;
|
|
|
- }
|
|
|
+ // let hasValidColor = false;
|
|
|
+ // canOutCar.forEach(car => {
|
|
|
+ // if (topPins.has(car.carColor)) {
|
|
|
+ // hasValidColor = true;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+
|
|
|
+ // if (!hasValidColor && canOutCar.length > 0) {
|
|
|
+ // // 如果没有符合条件的车,将第一个可开出的车的颜色改为待解锁的钉子颜色之一
|
|
|
+ // const firstCar = canOutCar[0];
|
|
|
+ // const newColor = Array.from(topPins)[0]; // 取第一个待解锁的颜色
|
|
|
+ // firstCar.carColor = newColor;
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
checkCarBox() {
|