Home > Back-end >  Ask for help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! C:
Ask for help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! C:

Time:10-23

A two-dimensional array of global variables, there is 1 representative pieces, 0 (no pieces


A separate function int o canmove (int x, int y, iny to_x, int to_y),

The starting point to the starting point and end point, the finish is any

How in function of two dimensional array, returns 1 mobile, cannot move, returns 0

CodePudding user response:

refer to the original poster u010698656 response:
there is a two-dimensional array of global variables, there is 1 representative pieces, 0 (no pieces


A separate function int o canmove (int x, int y, iny to_x, int to_y),

The starting point to the starting point and end point, the finish is any

How in the function of two dimensional array, returns 1 mobile, cannot move, returns 0

Judgment (x, y) to (to_x to_Y) between two points is in compliance with your rules,

Such as: x==to_x & amp; & Y==to_y certainly cannot move ah, ha ha

CodePudding user response:

Do you want to know what movement rules, and then according to the rules of mobile can to two-dimensional grid,
  • Related