58 lines
1.3 KiB
Java
58 lines
1.3 KiB
Java
/**
|
|
* <PRE>
|
|
* CIntelligence.java
|
|
*
|
|
* Revisions: 1.0 Nov. 13, 2002
|
|
* Created the CIntelligence class
|
|
*
|
|
* </PRE>
|
|
*
|
|
* @author <A HREF="mailto:gtg184g@mail.gatech.edu">Jose Manuel Caban</A>
|
|
* @version Version 1.0, Nov. 13, 2002
|
|
*/
|
|
|
|
public class CIntelligence implements Constants{
|
|
|
|
public CGrid createNodeGrid(CGrid cGrid, int iFloorLevel){
|
|
CGrid cToSend = new CGrid(cGrid.getX(),cGrid.getY());
|
|
|
|
for(int x=0; x<cGrid.length; x++){
|
|
for(int y=0; y<cGrid[].length;y++){
|
|
if(cGrid[x][y].getH() == iFloorLevel){
|
|
cToSend[x][y] = new Coord(x,y,iFloorLevel);
|
|
}
|
|
}
|
|
}
|
|
|
|
for(int x=0; x<cGrid.length;x++){
|
|
for(int y=0; y<cGrid[].length;y++){
|
|
if(cToSend[x][y] != null){
|
|
createNode(cToSend,new Coord(x,y,iFloorLevel));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
private void createNode(CGrid cToAdd, Coord cAt){
|
|
int x = cAt.getX();
|
|
int y = cAt.getY();
|
|
int h = cAt.getH();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Debugging main for class CIntelligence.
|
|
* This method will rigorously test my code.
|
|
*
|
|
* <br><br>
|
|
* @param args a String array of command line arguments.
|
|
*/
|
|
public static void main(String[] args) {
|
|
|
|
|
|
}// end of main(String[] args)
|
|
|
|
}// end of class CIntelligence
|