int function ( Square arg0 , Square arg1 ) { int loc0 = Math . abs ( arg1 . getID ( ) [ 0 ] - arg0 . getID ( ) [ 0 ] ) ; int loc1 = Math . abs ( arg1 . getID ( ) [ 1 ] - arg0 . getID ( ) [ 1 ] ) ; int loc2 = Math . loc2 ( loc0 , loc1 ) ; int loc3 = Math . loc3 ( loc0 , loc1 ) ; int loc4 = loc2 ; int loc5 = loc3 - loc2 ; Double loc6 = Math . sqrt ( 2 ) * loc4 + loc5 ; return ( int ) Math . abs ( loc6 ) ; }
standard euclidian distance method returns the integer distance between two points concode_field_sep ArrayList<Piece> piecesList concode_elem_sep Random rN concode_elem_sep ArrayList<Square> towersList concode_field_sep void setTowersList concode_elem_sep int SelectNextAction concode_elem_sep Square getNextSquare concode_elem_sep Square getClosestInRange concode_elem_sep Piece getNextPiece concode_elem_sep ArrayList<Square> getTowersList concode_elem_sep void doGameTurn concode_elem_sep ArrayList<Square> getOpponentTowers concode_elem_sep Boolean checkAIStatus concode_elem_sep ArrayList<Square> getOpponentPieces concode_elem_sep void setPiecesList concode_elem_sep ArrayList<Piece> getPiecesList