Note that there are some explanatory texts on larger screens.

plurals
  1. POAStar in a specific case in C#
    text
    copied!<p>To an intership, I have use the A* algorithm in the following case :</p> <ul> <li>the unit shape is a square of height and width of 1,</li> <li>we can travel from a zone represented by a rectangle from another, but we can't travel outside these predifined areas,</li> <li>we can go from a rectangle to another through a door, represented by a segment on corresponding square edge.</li> </ul> <p>Here are the 2 things I already did but which didn't satisfied my boss :</p> <p>1 : I created the following classes : -a Door class which contains the location of the 2 separated squares and the door's orientation (top, left, bottom, right), -a Map class which contains a door list, a rectangle list representing the walkable areas and a 2D array representing the ground's squares (for additionnal infomations through an enumeration) - classes for the A* algorithm (node, AStar)</p> <p>2 : -a MapCase class, which contains information about the case effect and doors through an enumeration (with [FLAGS] attribute set on, to be able to cummulate several information on each case) -a Map classes which only contains a 2D array of MapCase classes - the classes for the A* algorithm (still node an AStar).</p> <p>Since the 2 version is better than the first (less useless calculation, better map classes architecture), my boss is not still satisfied about my mapping classes architecture.</p> <p>The A* and node classes are good and easily mainainable, so I don't think I have to explain them deeper for now.</p> <p>So here is my asking : has somebody a good idea to implement the A* with the problem specification (rectangle walkable but with a square unit area, travelling through doors)?</p> <p>He said that a grid vision of the problem (so a 2D array) shouldn't be the correct way to solve the problem.</p> <p>I wish I've been clear while exposing my problem ..</p> <p>Thanks</p> <p>KiTe</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload