Mercurial > hg > ristipolku
changeset 167:7bf508d363bd
Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 02 Mar 2017 12:23:57 +0200 |
parents | bb2ee580bd2e |
children | 159252f9480d |
files | game/G.java game/Piece.java |
diffstat | 2 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/game/G.java Wed Mar 01 14:24:28 2017 +0200 +++ b/game/G.java Thu Mar 02 12:23:57 2017 +0200 @@ -1,3 +1,7 @@ +/* + * Ristipolku Game Engine + * (C) Copyright 2011 Matti 'ccr' Hämäläinen <ccr@tnsp.org> + */ package game; import java.awt.*; @@ -13,9 +17,10 @@ import game.*; import javax.sound.sampled.*; + public class G { - public static final String version = "0.85"; + public static final String version = "0.86"; public static final int numFonts = 4; public static Font fonts[];
--- a/game/Piece.java Wed Mar 01 14:24:28 2017 +0200 +++ b/game/Piece.java Thu Mar 02 12:23:57 2017 +0200 @@ -98,6 +98,7 @@ { for (int i = 0; i < numConnections; i++) states[i] = false; + stateChanged = true; } @@ -172,7 +173,8 @@ float ox = 0, oy = 0; float step = dim / 10; - switch (index) { + switch (index) + { // Normal line starting and ending points case 0: ox = 3.0f; oy = 0.4f; break; case 1: ox = 7.0f; oy = 0.4f; break; @@ -293,7 +295,8 @@ g.rotate(currAngle, x + dim / 2.0f, y + dim / 2.0f); // Color piece by type - switch (type) { + switch (type) + { case LOCKED: g.setPaint(new Color(0.3f, 0.8f, 0.3f, 0.35f)); break; case ACTIVE: g.setPaint(new Color(0.9f, 0.3f, 0.3f, 0.35f)); break; case START: g.setPaint(new Color(1.0f, 0.6f, 0.0f, 0.95f)); break;