diff Ristipolku.java @ 6:be0bf7544069

Cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 28 Jan 2011 18:42:16 +0200
parents e0e8fd08331e
children 70714c229e23
line wrap: on
line diff
--- a/Ristipolku.java	Fri Jan 28 18:00:18 2011 +0200
+++ b/Ristipolku.java	Fri Jan 28 18:42:16 2011 +0200
@@ -7,8 +7,10 @@
 import java.awt.*;
 import java.awt.geom.*;
 import java.awt.event.*;
-import javax.swing.*;
+//import javax.swing.*;
+import javax.imageio.*;
 import java.util.*;
+import java.io.*;
 import game.*;
 
 
@@ -52,10 +54,14 @@
         for (int x = 0; x < boardSize; x++)
         if (board[x][y] != null)
         {
+            AffineTransform save = g.getTransform();
+
             board[x][y].paint(g,
                 sx + (x * scale),
                 sy + (y * scale),
                 scale - scale / 10);
+
+            g.setTransform(save);
         }
     }
    
@@ -84,7 +90,7 @@
     public void pieceFinishTurn()
     {
         if (current != null)
-            current.setType(PieceType.NORMAL);
+            current.setType(PieceType.LOCKED);
       
         if (isEmpty(cx, cy))
         {