Back to project page rpg.
The source code is released under:
Apache License
If you think the Android project rpg listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.aschyiel.rpg.graph; //from w w w .j a va2 s . c o m import java.util.List; import org.aschyiel.rpg.graph.ChessBoard.Square; import android.util.Log; /** * A record of neighboring squares as an edge. */ public final class Step { protected final Square to; protected final Square from; public Step( final Square a, final Square b ) { from = a; to = b; } /** * For debugging paths. */ protected static void print( List<Step> li ) { StringBuilder sb = new StringBuilder(); sb.append( "Path as steps: \n" ); int i = 1; for ( Step step : li ) { sb.append( i ); sb.append( ". Move from " ); sb.append( step.from ); sb.append( " to " ); sb.append( step.to ); sb.append( ".\n" ); i++; } Log.d( "[RPG:Step]", sb.toString() ); } @Override public String toString() { return "{ from: "+ from +", to: "+ to +" }"; } }