Mercurial > hg > ristipolku
changeset 191:edf4081fecd6
Simplify.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 04 Apr 2019 12:47:29 +0300 |
parents | 5fbc9a6f739e |
children | 8dbaa093c562 |
files | game/Piece.java |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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; }