33import java .util .ArrayList ;
44import java .util .HashSet ;
55
6- import roboguice .util .Ln ;
76import android .animation .Animator ;
87import android .animation .Animator .AnimatorListener ;
98import android .animation .FloatEvaluator ;
@@ -84,7 +83,6 @@ public boolean onTouch(View v, MotionEvent event) {
8483 GameTile touchedTile = (GameTile )v ;
8584 //Ln.d("%s\n\tTile touched: %s", touchedTile, event);
8685 if (touchedTile .isEmpty () || !touchedTile .isInRowOrColumnOf (emptyTile )) {
87- Ln .d ("Empty or immovable tile; ignoring" );
8886 return false ;
8987 } else {
9088 if (event .getActionMasked () == MotionEvent .ACTION_DOWN ) {
@@ -167,7 +165,6 @@ protected boolean candidateRectForTileCollidesWithAnyOtherTile(GameTile tile, Re
167165 otherTileRect = new RectF (otherTile .getX (), otherTile .getY (), otherTile .getX () + otherTile .getWidth (), otherTile .getY () + otherTile .getHeight ());
168166 //Ln.d("Checking rect for %s, %s against %s", otherTile, otherTileRect, candidateRect);
169167 if (RectF .intersects (otherTileRect , candidateRect )) {
170- Ln .d ("Collision with %s" , otherTile );
171168 return true ;
172169 }
173170 }
@@ -181,7 +178,6 @@ protected void animateCurrentMovedTilesToEmptySpace() {
181178 emptyTile .coordinate = movedTile .coordinate ;
182179 ObjectAnimator animator ;
183180 for (final GameTileMotionDescriptor motionDescriptor : currentMotionDescriptors ) {
184- Ln .d ("Starting animation: %s" , motionDescriptor );
185181 animator = ObjectAnimator .ofObject (
186182 motionDescriptor .tile ,
187183 motionDescriptor .property ,
@@ -199,7 +195,6 @@ public void onAnimationEnd(Animator animation) {
199195 motionDescriptor .tile .coordinate = motionDescriptor .finalCoordinate ;
200196 motionDescriptor .tile .setX (motionDescriptor .finalRect .left );
201197 motionDescriptor .tile .setY (motionDescriptor .finalRect .top );
202- Ln .d ("Animation complete: %s" , motionDescriptor );
203198 }
204199 });
205200 animator .start ();
@@ -210,7 +205,6 @@ protected void animateMovedTilesBackToOrigin() {
210205 ObjectAnimator animator ;
211206 if (currentMotionDescriptors != null ) {
212207 for (final GameTileMotionDescriptor motionDescriptor : currentMotionDescriptors ) {
213- Ln .d ("Moving %s back" , motionDescriptor .tile );
214208 animator = ObjectAnimator .ofObject (
215209 motionDescriptor .tile ,
216210 motionDescriptor .property ,
@@ -224,7 +218,6 @@ public void onAnimationStart(Animator animation) { }
224218 public void onAnimationCancel (Animator animation ) { }
225219 public void onAnimationRepeat (Animator animation ) { }
226220 public void onAnimationEnd (Animator animation ) {
227- Ln .d ("Animation complete: %s" , motionDescriptor );
228221 }
229222 });
230223 animator .start ();
@@ -240,7 +233,6 @@ private ArrayList<GameTileMotionDescriptor> getTilesBetweenEmptyTileAndTile(Game
240233 Rect finalRect , currentRect ;
241234 float axialDelta ;
242235 if (tile .isToRightOf (emptyTile )) {
243- Ln .d ("To right of empty tile" );
244236 for (int i = tile .coordinate .column ; i > emptyTile .coordinate .column ; i --) {
245237 coordinate = new Coordinate (tile .coordinate .row , i );
246238 foundTile = (tile .coordinate .matches (coordinate )) ? tile : getTileAtCoordinate (coordinate ) ;
@@ -260,7 +252,6 @@ private ArrayList<GameTileMotionDescriptor> getTilesBetweenEmptyTileAndTile(Game
260252 descriptors .add (motionDescriptor );
261253 }
262254 } else if (tile .isToLeftOf (emptyTile )) {
263- Ln .d ("To left of empty tile" );
264255 for (int i = tile .coordinate .column ; i < emptyTile .coordinate .column ; i ++) {
265256 coordinate = new Coordinate (tile .coordinate .row , i );
266257 foundTile = (tile .coordinate .matches (coordinate )) ? tile : getTileAtCoordinate (coordinate ) ;
@@ -280,7 +271,6 @@ private ArrayList<GameTileMotionDescriptor> getTilesBetweenEmptyTileAndTile(Game
280271 descriptors .add (motionDescriptor );
281272 }
282273 } else if (tile .isAbove (emptyTile )) {
283- Ln .d ("Above empty tile" );
284274 for (int i = tile .coordinate .row ; i < emptyTile .coordinate .row ; i ++) {
285275 coordinate = new Coordinate (i , tile .coordinate .column );
286276 foundTile = (tile .coordinate .matches (coordinate )) ? tile : getTileAtCoordinate (coordinate ) ;
@@ -300,7 +290,6 @@ private ArrayList<GameTileMotionDescriptor> getTilesBetweenEmptyTileAndTile(Game
300290 descriptors .add (motionDescriptor );
301291 }
302292 } else if (tile .isBelow (emptyTile )) {
303- Ln .d ("Below empty tile" );
304293 for (int i = tile .coordinate .row ; i > emptyTile .coordinate .row ; i --) {
305294 coordinate = new Coordinate (i , tile .coordinate .column );
306295 foundTile = (tile .coordinate .matches (coordinate )) ? tile : getTileAtCoordinate (coordinate ) ;
@@ -344,7 +333,6 @@ protected GameTile createTileAtCoordinate(Coordinate coordinate) {
344333 protected void determineGameboardSizes () {
345334 int viewWidth = getWidth ();
346335 int viewHeight = getHeight ();
347- Ln .d ("width %d, height %d" , viewWidth , viewHeight );
348336 // ostensibly tiles can be sized based on view geometry. Hardcode for now.
349337 tileSize = new Size (68 , 68 );
350338 int gameboardWidth = tileSize .width * 4 ;
0 commit comments