changeset 43:9664bbb9d613

Cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 22 Feb 2011 06:01:14 +0200
parents 951a4d669af0
children 698c6bcc4aec
files game/Engine.java game/Piece.java
diffstat 2 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/game/Engine.java	Tue Feb 22 05:58:55 2011 +0200
+++ b/game/Engine.java	Tue Feb 22 06:01:14 2011 +0200
@@ -272,18 +272,19 @@
                 }
                 else
                 {
-                    // Mark, if needed
+                    // Mark the current piece as locked
                     curr.setType(PieceType.LOCKED);
-                    System.out.print("M1 = "+currPoint+", rotated="+curr.getRotatedPoint(currPoint)+"\n");
+                    
+                    // Solve connection (with rotations) through the piece
                     currPoint = curr.getRotatedPoint(curr.getMatchingPoint(currPoint));
+                    
+                    // Mark connection as active
                     curr.setConnectionState(currPoint, true);
                     
-                    System.out.print("matchingrotated="+currPoint+"\n");
-
-                    // Move to next position
-                    currPoint = curr.getConnection(currPoint);
-                    System.out.print("conn="+currPoint+"\n");
-                    currPoint = curr.getAntiRotatedPoint(currPoint);
+                    // Solve exit point (with rotations)
+                    currPoint = curr.getAntiRotatedPoint(curr.getConnection(currPoint));
+                    
+                    // Move to next position accordingly
                     pieceMoveTo(currPoint);
                 }
             }
--- a/game/Piece.java	Tue Feb 22 05:58:55 2011 +0200
+++ b/game/Piece.java	Tue Feb 22 06:01:14 2011 +0200
@@ -100,7 +100,6 @@
     {
         int point = (in + (currRotation * 2)) % 8;
         if (point < 0) point = 8 + point;
-        System.out.print("getAntiRotatedPoint("+ in +"): rot="+currRotation+", point="+point+"\n");
         return point;
     }