Results 1 to 4 of 4
- 12-27-2012, 01:39 AM #1
Member
- Join Date
- Dec 2012
- Posts
- 1
- Rep Power
- 0
[Help]
I need help... I'm doing Bejeweled in JAVA, but I need help to overpass a problem...
When I start the board for the first time, I cannot have 3 or more pieces of the same color, but my function "verifica_inicio" it's not doing the work that it should have :S
Can anyone help me?
pos_x/pos_y is the position in the matrix
fig_aleat is the random piece that is randomized at the moment
Java Code:public int verifica_inicio(int fig_aleat,int pos_x,int pos_y){ if(pos_x<2 && pos_y<2){ return 1; } if(pos_x<2){ if((fig_aleat!=matriz[pos_x][pos_y-1] || fig_aleat!=matriz[pos_x][pos_y-2])){ return 1; } } if (pos_y<2){ if(fig_aleat!=matriz[pos_x-1][pos_y] || fig_aleat!=matriz[pos_x-2][pos_y]){ return 1; } } if(fig_aleat!=matriz[pos_x-1][pos_y] || fig_aleat!=matriz[pos_x-2][pos_y]){ if((fig_aleat!=matriz[pos_x][pos_y-1] || fig_aleat!=matriz[pos_x][pos_y-2])){ return 1; } } return 0; }
-
Re: [Help]
Please read faq's on how to ask better questions. For one, please do not cross-post your questions to other sites without notifying us that you've done so, unless you don't respect our desire not to waste our free time. Next, please go to advanced editing to change the heading of your question to one that summarizes your problem. "Help" tells us nothing about what problem you're having. Next tell the details of your problem. Assume that we can't read minds and that we don't know what your code should be doing or how specifically it's misbehaving.
- 12-27-2012, 03:13 AM #3
Re: [Help]
Moved from the Entertainment section. Nothing entertaining about it.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 12-27-2012, 03:46 AM #4
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,606
- Rep Power
- 5


1Likes
LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks