I am especially interested in one thing, @Malachi suggested that I should use 3x3 tables of 3x3 cells for the game. And now I have 9 divs * 9 divs (as you suggested it's better to use divs than tables), how on earth will those divs line up correctly to make the correct look? I hope to see this in your CSS :)
@kleinfreund they were using Tables long before CSS came along. so the most correct thing is the thing that is easiest to maintain, and the thing that works the best with the code behind for the current objective.
if you separate the 9 boards that is easiest. now the thing about the tables.....
@kleinfreund I think you are right here to use divs and not tables. but wait, you can check tr's to find out if all the td's contained in it are x's or o's
@Malachi As I've stated before, I let GWT take care of all the logic for me. I don't have to even care about the fact that my game logic is based in a web view.
@lol.upvote I know what you mean. this program is crappy, the XML file it is trying to create is like 2 gb and will only get bigger, and it's in a dataset so that has to be created from the SQL query and then written to the XML file. I am trying to do it in chunks instead of one big piece
@Malachi You said "you can check tr's to find out if all the td's contained in it are x's or o's", but I don't need to take care of that. All my game logic is written in pure Java code, which is then compiled into JavaScript.
for (int yy = 0; yy < BIG_SIZE; yy++) {
for (int xx = 0; xx < BIG_SIZE; xx++) {
final TTTile tile = game.getSub(xx, yy);
final Button button = new Button();
SimplePanel btnPanel = new SimplePanel(button);
....
inline-block elements have behavior of block and inline elements. One of the inline things is, that whitespace between these elements gets taken into account.
No, they were inline-block all the time. The extra whitespace ruined the layout on your devices.
The first technique was setting the font-size to zero on .game and .area. Zero font-size = Zero whitespace.
However, your Androids don't seem to like this and generated whitespace anyway.
I used another technique and now it's working.
The technique I'm now using comments the whitespace out. The same result would be, if we would wrote everything on the same line (no line-breaks, indentation = no whitespace)
This is the preferred solution of getting rid of the whitespace. It's kind of best practise.
@kleinfreund I honestly have no idea on how I should generate that properly, I just create Java objects and let GWT do the generation for me... I just searched the internet for this but doesn't seem to find any good results... is there another way to solve this problem?
@kleinfreund Both yes and no, I can define which elements and their attributes easily, but I don't think I have much control of the whitespace between these elements.
@kleinfreund Honestly, I'm not sure, since it's added dynamically thanks to compiled JavaScript...
I notice that the bejofo.net site uses <br> to create the rows (for both the small tiles and the 3x3 areas), could that be a possibly solution somehow?
Otherwise, perhaps a reviewer can suggest another approach than the <!--- commenting whitespace option -->
@kleinfreund Yes, absolutely. You could post the link to both your page and my page, so that they know that it will actually be used in a functional game :)
I'm going to apply it right now, just tested locally and it seems to be working well.
@lol.upvote I'm actually considering it, I'd just have to change my Buttons to Images or something... Or I could use it for a possible Android version? :)