- Joined
- Oct 26, 2012
- Messages
- 2,357
- Reaction score
- 1,086
Great updates Steve. Still this development is going great! Don't ruin it please by selling it in the end.
Hopefully Sulake won't sue you and force you to stop. Best developer I've seen in years.
Sulake doesn't sue, they can't afford to take down all the people who develop, so they send out a scare tactic instead.
Then tell me why you did sign those letters?
Their tactics then apparently works...
Then tell me why you did sign those letters?
Their tactics then apparently works...
Cool beans Steve, I was curious whether someone already wrote an emulator in Scala, Googled and then ended up here. Pure Java!
Anyway, interesting to read that you managed to implement a solver for the 'Banzai connected shapes filler' thing, most people never bothered with that but back in the day I thought it was a nice challenge. Recursive implementation? Fills any polygon or just rectangles? I remember that it was a witch when trying to get it right in all scenarios.
Keep it up, cool job on the JS plugins as well!
private static List<GenericFloorItem> findCombo(final GenericFloorItem tile, final int find, int X, int Y, int xCan, int yCan, int curRot, int turn) {
final boolean[] moves = new boolean[4];
if(xCan == -1) {
moves[0] = true;
} else if(xCan == 1) {
moves[2] = true;
} else if(xCan == 0) {
moves[0] = true;
moves[2] = true;
}
if(yCan == -1) {
moves[1] = true;
} else if(yCan == 1) {
moves[3] = true;
} else if(yCan == 0) {
moves[1] = true;
moves[3] = true;
}
if((xCan != 0 || yCan != 0) && tile.getX() == X && tile.getY() == Y) {
return new ArrayList<GenericFloorItem>();
}
for(int i=0;i<4;i++) {
if(!moves[i]) {
continue;
}
int x,y;
if(i == 0) {
x = X + 1;
y = Y;
} else if(i == 1) {
x = X;
y = Y + 1;
} else if(i == 2) {
x = X - 1;
y = Y;
} else { // if(i == 3)
x = X;
y = Y - 1;
}
final RoomTask room = tile.getRoom();
final int nextXY = x + (y * room.model.widthX);
if(x < room.model.widthX && y < room.model.heightY) {
final GenericFloorItem top = (GenericFloorItem)room.topFloorItems.get(nextXY);
if(top != null) {
if(top.getIntData() == find) {
if(curRot != i && curRot != -1) {
if(turn != 0) {
List<GenericFloorItem> found = null;
if(i == 0) {
found = findCombo(tile, find, x, y, -1, (yCan*-1), i, (turn - 1));
} else if(i == 1) {
found = findCombo(tile, find, x, y, (xCan*-1), -1, i, (turn - 1));
} else if(i == 2) {
found = findCombo(tile, find, x, y, 1, (yCan*-1), i, (turn - 1));
} else if(i == 3) {
found = findCombo(tile, find, x, y, (xCan*-1), 1, i, (turn - 1));
}
if(found != null) {
found.add(top);
return found;
}
}
} else {
List<GenericFloorItem> found = null;
if(i == 0) {
found = findCombo(tile, find, x, y, -1, yCan, i, turn);
} else if(i == 1) {
found = findCombo(tile, find, x, y, xCan, -1, i, turn);
} else if(i == 2) {
found = findCombo(tile, find, x, y, 1, yCan, i, turn);
} else if(i == 3) {
found = findCombo(tile, find, x, y, xCan, 1, i, turn);
}
if(found != null) {
found.add(top);
return found;
}
}
}
}
}
}
return null;
}
It uses HTML5 so runs in the browser.Hey man will you release the iOS, Android app as well?
Hejula he created an Android and iOS app
ooo nice!! steffchef how did you make an HTML5 App for Android?
There are many frameworks that allow for this. Cordova, Phonegap, Ionic and more I can't think of
But do any allow php aswell? (php fanboy)
Just created a little android app which opens smartkeeping via a Blink WebView and implemented Notifications via JavaScript (on top of that there is a service running in the background)There are many frameworks that allow for this. Cordova, Phonegap, Ionic and more I can't think of