Commit dec51142 authored by Tt's avatar Tt

重点数值错误问题处理

parent 43515f55
...@@ -131,14 +131,14 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -131,14 +131,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
let points = this.getMovePoints(this.robotPoint, runNum); let points = this.getMovePoints(this.robotPoint, runNum);
console.log(points); console.log(points);
this.chessRobot.getComponent("chess").run(points).then(() => { this.chessRobot.getComponent("chess").run(points).then(() => {
this.robotPoint += runNum; this.robotPoint += (points.length - 1);
resolve(''); resolve('');
}) })
} else { } else {
let points = this.getMovePoints(this.playerPoint, runNum); let points = this.getMovePoints(this.playerPoint, runNum);
console.log(points); console.log(points);
this.chessPlayer.getComponent("chess").run(points).then(() => { this.chessPlayer.getComponent("chess").run(points).then(() => {
this.playerPoint += runNum; this.playerPoint += (points.length - 1);
resolve(''); resolve('');
}) })
} }
......
export default [{ "id": "1", "yellow_x": "-480", "yellow_y": "70", "blue_x": "-345", "blue_y": "70", "type": "0", "value": "0" }, { "id": "2", "yellow_x": "-480", "yellow_y": "290", "blue_x": "-345", "blue_y": "135", "type": "1", "value": "blackboard" }, { "id": "3", "yellow_x": "-270", "yellow_y": "290", "blue_x": "-270", "blue_y": "135", "type": "1", "value": "window" }, { "id": "4", "yellow_x": "-130", "yellow_y": "290", "blue_x": "-130", "blue_y": "135", "type": "1", "value": "door" }, { "id": "5", "yellow_x": "-10", "yellow_y": "290", "blue_x": "-10", "blue_y": "135", "type": "2", "value": "2" }, { "id": "6", "yellow_x": "150", "yellow_y": "290", "blue_x": "150", "blue_y": "135", "type": "1", "value": "window" }, { "id": "7", "yellow_x": "300", "yellow_y": "290", "blue_x": "300", "blue_y": "135", "type": "5", "value": "14" }, { "id": "8", "yellow_x": "500", "yellow_y": "290", "blue_x": "370", "blue_y": "135", "type": "1", "value": "door" }, { "id": "9", "yellow_x": "500", "yellow_y": "70", "blue_x": "370", "blue_y": "70", "type": "3", "value": "1" }, { "id": "10", "yellow_x": "500", "yellow_y": "-70", "blue_x": "370", "blue_y": "-70", "type": "1", "value": "door" }, { "id": "11", "yellow_x": "500", "yellow_y": "-280", "blue_x": "370", "blue_y": "-125", "type": "1", "value": "blackboard" }, { "id": "12", "yellow_x": "290", "yellow_y": "-280", "blue_x": "290", "blue_y": "-125", "type": "1", "value": "window" }, { "id": "13", "yellow_x": "150", "yellow_y": "-280", "blue_x": "150", "blue_y": "-125", "type": "2", "value": "3" }, { "id": "14", "yellow_x": "10", "yellow_y": "-280", "blue_x": "10", "blue_y": "-125", "type": "1", "value": "blackboard" }, { "id": "15", "yellow_x": "-130", "yellow_y": "-280", "blue_x": "-130", "blue_y": "-125", "type": "2", "value": "1" }, { "id": "16", "yellow_x": "-270", "yellow_y": "-280", "blue_x": "-270", "blue_y": "-125", "type": "1", "value": "window" }, { "id": "17", "yellow_x": "-410", "yellow_y": "-280", "blue_x": "-410", "blue_y": "-125", "type": "4", "value": "5" }, { "id": "18", "yellow_x": "-550", "yellow_y": "-280", "blue_x": "-550", "blue_y": "-125", "type": "1", "value": "door" }, { "id": "19", "yellow_x": "-775", "yellow_y": "-280", "blue_x": "-600", "blue_y": "-125", "type": "1", "value": "blackboard" }, { "id": "20", "yellow_x": "-775", "yellow_y": "-55", "blue_x": "-600", "blue_y": "-55", "type": "1", "value": "window" }, { "id": "21", "yellow_x": "-775", "yellow_y": "80", "blue_x": "-600", "blue_y": "80", "type": "4", "value": "5" }, { "id": "22", "yellow_x": "-775", "yellow_y": "220", "blue_x": "-600", "blue_y": "220", "type": "2", "value": "3" }, { "id": "23", "yellow_x": "-775", "yellow_y": "365", "blue_x": "-600", "blue_y": "365", "type": "1", "value": "door" }, { "id": "24", "yellow_x": "-775", "yellow_y": "550", "blue_x": "-600", "blue_y": "420", "type": "2", "value": "5" }, { "id": "25", "yellow_x": "-550", "yellow_y": "550", "blue_x": "-550", "blue_y": "420", "type": "1", "value": "window" }, { "id": "26", "yellow_x": "-410", "yellow_y": "550", "blue_x": "-410", "blue_y": "420", "type": "4", "value": "5" }, { "id": "27", "yellow_x": "-270", "yellow_y": "550", "blue_x": "-270", "blue_y": "420", "type": "2", "value": "2" }, { "id": "28", "yellow_x": "-130", "yellow_y": "550", "blue_x": "-130", "blue_y": "420", "type": "1", "value": "door" }, { "id": "29", "yellow_x": "10", "yellow_y": "550", "blue_x": "10", "blue_y": "420", "type": "1", "value": "blackboard" }, { "id": "30", "yellow_x": "150", "yellow_y": "550", "blue_x": "150", "blue_y": "420", "type": "3", "value": "1" }, { "id": "31", "yellow_x": "290", "yellow_y": "550", "blue_x": "290", "blue_y": "420", "type": "1", "value": "window" }, { "id": "32", "yellow_x": "430", "yellow_y": "550", "blue_x": "430", "blue_y": "420", "type": "2", "value": "1" }, { "id": "33", "yellow_x": "570", "yellow_y": "550", "blue_x": "570", "blue_y": "420", "type": "4", "value": "5" }, { "id": "34", "yellow_x": "790", "yellow_y": "550", "blue_x": "630", "blue_y": "420", "type": "1", "value": "blackboard" }, { "id": "35", "yellow_x": "790", "yellow_y": "360", "blue_x": "630", "blue_y": "360", "type": "1", "value": "door" }, { "id": "36", "yellow_x": "790", "yellow_y": "215", "blue_x": "630", "blue_y": "215", "type": "2", "value": "3" }, { "id": "37", "yellow_x": "790", "yellow_y": "70", "blue_x": "630", "blue_y": "70", "type": "5", "value": "43" }, { "id": "38", "yellow_x": "790", "yellow_y": "-75", "blue_x": "630", "blue_y": "-75", "type": "3", "value": "1" }, { "id": "39", "yellow_x": "790", "yellow_y": "-220", "blue_x": "630", "blue_y": "-220", "type": "1", "value": "window" }, { "id": "40", "yellow_x": "790", "yellow_y": "-365", "blue_x": "630", "blue_y": "-365", "type": "2", "value": "1" }, { "id": "41", "yellow_x": "790", "yellow_y": "-550", "blue_x": "630", "blue_y": "-405", "type": "1", "value": "blackboard" }, { "id": "42", "yellow_x": "570", "yellow_y": "-550", "blue_x": "570", "blue_y": "-405", "type": "1", "value": "window" }, { "id": "43", "yellow_x": "430", "yellow_y": "-550", "blue_x": "430", "blue_y": "-405", "type": "2", "value": "2" }, { "id": "44", "yellow_x": "290", "yellow_y": "-550", "blue_x": "290", "blue_y": "-405", "type": "1", "value": "door" }, { "id": "45", "yellow_x": "150", "yellow_y": "-550", "blue_x": "150", "blue_y": "-405", "type": "4", "value": "5" }, { "id": "46", "yellow_x": "10", "yellow_y": "-550", "blue_x": "10", "blue_y": "-405", "type": "1", "value": "blackboard" }, { "id": "47", "yellow_x": "-130", "yellow_y": "-550", "blue_x": "-130", "blue_y": "-405", "type": "1", "value": "window" }, { "id": "48", "yellow_x": "-270", "yellow_y": "-550", "blue_x": "-270", "blue_y": "-405", "type": "1", "value": "door" }, { "id": "49", "yellow_x": "-410", "yellow_y": "-550", "blue_x": "-410", "blue_y": "-405", "type": "2", "value": "2" }, { "id": "50", "yellow_x": "-550", "yellow_y": "-550", "blue_x": "-550", "blue_y": "-405", "type": "1", "value": "blackboard" }, { "id": "51", "yellow_x": "-690", "yellow_y": "-490", "blue_x": "-690", "blue_y": "-490", "type": "0", "value": "0" }] export default [
\ No newline at end of file { "id": "1", "yellow_x": "-480", "yellow_y": "70", "blue_x": "-345", "blue_y": "70", "type": "0", "value": "0" }, { "id": "2", "yellow_x": "-480", "yellow_y": "290", "blue_x": "-345", "blue_y": "135", "type": "1", "value": "blackboard" }, { "id": "3", "yellow_x": "-270", "yellow_y": "290", "blue_x": "-270", "blue_y": "135", "type": "1", "value": "window" }, { "id": "4", "yellow_x": "-130", "yellow_y": "290", "blue_x": "-130", "blue_y": "135", "type": "1", "value": "door" }, { "id": "5", "yellow_x": "-10", "yellow_y": "290", "blue_x": "-10", "blue_y": "135", "type": "2", "value": "2" }, { "id": "6", "yellow_x": "150", "yellow_y": "290", "blue_x": "150", "blue_y": "135", "type": "1", "value": "window" }, { "id": "7", "yellow_x": "300", "yellow_y": "290", "blue_x": "300", "blue_y": "135", "type": "5", "value": "14" }, { "id": "8", "yellow_x": "500", "yellow_y": "290", "blue_x": "370", "blue_y": "135", "type": "1", "value": "door" }, { "id": "9", "yellow_x": "500", "yellow_y": "70", "blue_x": "370", "blue_y": "70", "type": "3", "value": "1" }, { "id": "10", "yellow_x": "500", "yellow_y": "-70", "blue_x": "370", "blue_y": "-70", "type": "1", "value": "door" }, { "id": "11", "yellow_x": "500", "yellow_y": "-280", "blue_x": "370", "blue_y": "-125", "type": "1", "value": "blackboard" }, { "id": "12", "yellow_x": "290", "yellow_y": "-280", "blue_x": "290", "blue_y": "-125", "type": "1", "value": "window" }, { "id": "13", "yellow_x": "150", "yellow_y": "-280", "blue_x": "150", "blue_y": "-125", "type": "2", "value": "3" }, { "id": "14", "yellow_x": "10", "yellow_y": "-280", "blue_x": "10", "blue_y": "-125", "type": "1", "value": "blackboard" }, { "id": "15", "yellow_x": "-130", "yellow_y": "-280", "blue_x": "-130", "blue_y": "-125", "type": "2", "value": "1" }, { "id": "16", "yellow_x": "-270", "yellow_y": "-280", "blue_x": "-270", "blue_y": "-125", "type": "1", "value": "window" }, { "id": "17", "yellow_x": "-410", "yellow_y": "-280", "blue_x": "-410", "blue_y": "-125", "type": "4", "value": "5" }, { "id": "18", "yellow_x": "-550", "yellow_y": "-280", "blue_x": "-550", "blue_y": "-125", "type": "1", "value": "door" }, { "id": "19", "yellow_x": "-775", "yellow_y": "-280", "blue_x": "-600", "blue_y": "-125", "type": "1", "value": "blackboard" }, { "id": "20", "yellow_x": "-775", "yellow_y": "-55", "blue_x": "-600", "blue_y": "-55", "type": "1", "value": "window" }, { "id": "21", "yellow_x": "-775", "yellow_y": "80", "blue_x": "-600", "blue_y": "80", "type": "4", "value": "5" }, { "id": "22", "yellow_x": "-775", "yellow_y": "220", "blue_x": "-600", "blue_y": "220", "type": "2", "value": "3" }, { "id": "23", "yellow_x": "-775", "yellow_y": "365", "blue_x": "-600", "blue_y": "365", "type": "1", "value": "door" }, { "id": "24", "yellow_x": "-775", "yellow_y": "550", "blue_x": "-600", "blue_y": "420", "type": "2", "value": "5" }, { "id": "25", "yellow_x": "-550", "yellow_y": "550", "blue_x": "-550", "blue_y": "420", "type": "1", "value": "window" }, { "id": "26", "yellow_x": "-410", "yellow_y": "550", "blue_x": "-410", "blue_y": "420", "type": "4", "value": "5" }, { "id": "27", "yellow_x": "-270", "yellow_y": "550", "blue_x": "-270", "blue_y": "420", "type": "2", "value": "2" }, { "id": "28", "yellow_x": "-130", "yellow_y": "550", "blue_x": "-130", "blue_y": "420", "type": "1", "value": "door" }, { "id": "29", "yellow_x": "10", "yellow_y": "550", "blue_x": "10", "blue_y": "420", "type": "1", "value": "blackboard" }, { "id": "30", "yellow_x": "150", "yellow_y": "550", "blue_x": "150", "blue_y": "420", "type": "3", "value": "1" }, { "id": "31", "yellow_x": "290", "yellow_y": "550", "blue_x": "290", "blue_y": "420", "type": "1", "value": "window" }, { "id": "32", "yellow_x": "430", "yellow_y": "550", "blue_x": "430", "blue_y": "420", "type": "2", "value": "1" }, { "id": "33", "yellow_x": "570", "yellow_y": "550", "blue_x": "570", "blue_y": "420", "type": "4", "value": "5" }, { "id": "34", "yellow_x": "790", "yellow_y": "550", "blue_x": "630", "blue_y": "420", "type": "1", "value": "blackboard" }, { "id": "35", "yellow_x": "790", "yellow_y": "360", "blue_x": "630", "blue_y": "360", "type": "1", "value": "door" }, { "id": "36", "yellow_x": "790", "yellow_y": "215", "blue_x": "630", "blue_y": "215", "type": "2", "value": "3" }, { "id": "37", "yellow_x": "790", "yellow_y": "70", "blue_x": "630", "blue_y": "70", "type": "5", "value": "43" }, { "id": "38", "yellow_x": "790", "yellow_y": "-75", "blue_x": "630", "blue_y": "-75", "type": "3", "value": "1" }, { "id": "39", "yellow_x": "790", "yellow_y": "-220", "blue_x": "630", "blue_y": "-220", "type": "1", "value": "window" }, { "id": "40", "yellow_x": "790", "yellow_y": "-365", "blue_x": "630", "blue_y": "-365", "type": "2", "value": "1" }, { "id": "41", "yellow_x": "790", "yellow_y": "-550", "blue_x": "630", "blue_y": "-405", "type": "1", "value": "blackboard" }, { "id": "42", "yellow_x": "570", "yellow_y": "-550", "blue_x": "570", "blue_y": "-405", "type": "1", "value": "window" }, { "id": "43", "yellow_x": "430", "yellow_y": "-550", "blue_x": "430", "blue_y": "-405", "type": "2", "value": "2" }, { "id": "44", "yellow_x": "290", "yellow_y": "-550", "blue_x": "290", "blue_y": "-405", "type": "1", "value": "door" }, { "id": "45", "yellow_x": "150", "yellow_y": "-550", "blue_x": "150", "blue_y": "-405", "type": "4", "value": "5" }, { "id": "46", "yellow_x": "10", "yellow_y": "-550", "blue_x": "10", "blue_y": "-405", "type": "1", "value": "blackboard" }, { "id": "47", "yellow_x": "-130", "yellow_y": "-550", "blue_x": "-130", "blue_y": "-405", "type": "1", "value": "window" }, { "id": "48", "yellow_x": "-270", "yellow_y": "-550", "blue_x": "-270", "blue_y": "-405", "type": "1", "value": "door" }, { "id": "49", "yellow_x": "-410", "yellow_y": "-550", "blue_x": "-410", "blue_y": "-405", "type": "2", "value": "2" }, { "id": "50", "yellow_x": "-550", "yellow_y": "-550", "blue_x": "-550", "blue_y": "-405", "type": "1", "value": "blackboard" },
{ "id": "51", "yellow_x": "-690", "yellow_y": "-490", "blue_x": "-690", "blue_y": "-490", "type": "100", "value": "0" }]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment