改绘制错误 bug + 将地图行,列,障碍物数量改为后端获取

This commit is contained in:
2023-03-01 11:13:30 +08:00
parent e6c49ad600
commit 1224f16414
7 changed files with 235 additions and 92 deletions
+9 -3
View File
@@ -8,6 +8,9 @@ export default {
opponent_username: "",
opponent_photo: "",
game_map: null,
rows: 0,
cols: 0,
inner_walls_count: 0,
},
getters: {},
mutations: {
@@ -25,9 +28,12 @@ export default {
state.status = status;
},
// 更新地图
updateGameMap(state,game_map){
state.game_map = game_map;
}
updateGameMap(state, game_data) {
state.game_map = game_data.game_map;
state.rows = game_data.rows;
state.cols = game_data.cols;
state.inner_walls_count = game_data.inner_walls_count;
},
},
actions: {},
module: {},