Cleanup and a few bugfixes

This commit is contained in:
Wizjany
2011-09-24 15:24:10 -04:00
parent a2e23fedf7
commit b5b55a2775
30 changed files with 170 additions and 191 deletions

View File

@ -43,7 +43,7 @@ public class BaseBlock {
* @param type
*/
public BaseBlock(int type) {
this.type = (short)type;
this.type = (short) type;
}
/**
@ -53,22 +53,22 @@ public class BaseBlock {
* @param data
*/
public BaseBlock(int type, int data) {
this.type = (short)type;
this.data = (byte)data;
this.type = (short) type;
this.data = (byte) data;
}
/**
* @return the type
*/
public int getType() {
return (int)type;
return (int) type;
}
/**
* @param type the type to set
*/
public void setType(int type) {
this.type = (short)type;
this.type = (short) type;
}
/**
@ -82,7 +82,7 @@ public class BaseBlock {
* @param data the data to set
*/
public void setData(int data) {
this.data = (byte)data;
this.data = (byte) data;
}
/**
@ -98,14 +98,14 @@ public class BaseBlock {
* Rotate this block 90 degrees.
*/
public void rotate90() {
data = (byte)BlockData.rotate90(type, data);
data = (byte) BlockData.rotate90(type, data);
}
/**
* Rotate this block -90 degrees.
*/
public void rotate90Reverse() {
data = (byte)BlockData.rotate90Reverse(type, data);
data = (byte) BlockData.rotate90Reverse(type, data);
}
/**
@ -129,8 +129,8 @@ public class BaseBlock {
if (!(o instanceof BaseBlock)) {
return false;
}
return (type == ((BaseBlock)o).type)
&& (data == ((BaseBlock)o).data || data == -1 || ((BaseBlock)o).data == -1);
return (type == ((BaseBlock) o).type)
&& (data == ((BaseBlock) o).data || data == -1 || ((BaseBlock) o).data == -1);
}
@Override