# HG changeset patch # User Matti Hamalainen # Date 1554371249 -10800 # Node ID edf4081fecd61eea1041ecc21bb1c81b275ef679 # Parent 5fbc9a6f739eb484492ccbde9b217e5b87835e5c Simplify. diff -r 5fbc9a6f739e -r edf4081fecd6 game/Piece.java --- a/game/Piece.java Thu Apr 04 11:44:54 2019 +0300 +++ b/game/Piece.java Thu Apr 04 12:47:29 2019 +0300 @@ -104,19 +104,19 @@ public int getRotation() { - return currRotation % 4; + return (currRotation % 4) * 2; } public int getRotatedPoint(int in) { - int point = (in - (getRotation() * 2)) % 8; + int point = (in - getRotation()) % 8; if (point < 0) point = 8 + point; return point; } public int getAntiRotatedPoint(int in) { - int point = (in + (getRotation() * 2)) % 8; + int point = (in + getRotation()) % 8; if (point < 0) point = 8 + point; return point; }