public void SetItem(int x, int y, RotationMode rotationMode)
{
var jx = 0;
var jy = 0;
switch (rotationMode) {
case RotationMode.Floor:
jx = x;
jy = y;
break;
case RotationMode.LeftWall:
jx = y;
jy = 15 - x;
break;
case RotationMode.Ceiling:
jx = x;
jy = 15 - y;
break;
case RotationMode.RightWall:
jx = y;
jy = x;
break;
}
Items[jx] = 16 - jy;
}