Skip to content

Commit 925823f

Browse files
committed
Removing RoboGuice because things are dying for no reason
1 parent 4b6024e commit 925823f

File tree

7 files changed

+2
-27
lines changed

7 files changed

+2
-27
lines changed

.classpath

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,5 @@
44
<classpathentry kind="src" path="gen"/>
55
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
66
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
7-
<classpathentry kind="lib" path="lib/roboguice-1.1.2.jar"/>
8-
<classpathentry kind="lib" path="lib/guice-2.0-no_aop.jar"/>
97
<classpathentry kind="output" path="bin/classes"/>
108
</classpath>

AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<application
1010
android:icon="@drawable/ic_launcher"
1111
android:label="@string/app_name"
12-
android:name="com.tackmobile.SliderPuzzleApplication"
1312
android:theme="@android:style/Theme.NoTitleBar">
1413
<activity
1514
android:name=".SliderPuzzleActivity"

lib/guice-2.0-no_aop.jar

-430 KB
Binary file not shown.

lib/roboguice-1.1.2.jar

-103 KB
Binary file not shown.

src/com/tackmobile/GameboardView.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import java.util.ArrayList;
44
import java.util.HashSet;
55

6-
import roboguice.util.Ln;
76
import android.animation.Animator;
87
import android.animation.Animator.AnimatorListener;
98
import 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;

src/com/tackmobile/SliderPuzzleActivity.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
package com.tackmobile;
22

3-
import roboguice.activity.RoboActivity;
4-
import roboguice.inject.InjectView;
3+
import android.app.Activity;
54
import android.os.Bundle;
65

7-
public class SliderPuzzleActivity extends RoboActivity {
8-
9-
@InjectView(R.id.gameboard) GameboardView gameboard;
6+
public class SliderPuzzleActivity extends Activity {
107

118
@Override
129
public void onCreate(Bundle savedInstanceState) {

src/com/tackmobile/SliderPuzzleApplication.java

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)