Erwan Jumel

Greenhorn
+ Follow
since Nov 12, 2020
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Erwan Jumel

Liutauras Vilda wrote:

Erwan Jumel wrote:Yes I understand what you mean, with a good understanding of the game it's easier to program, but from what I understand, the method must return true if the adjacent square is revealed and if it has no adjacent mine (the mine is the "-1" so the bomb!).


Well, it isn't very clear what kind of functionality you'd be trying to satisfy with such method.

So we have this, what you wrote earlier:

Erwan Jumel wrote:...we have a function that must return a boolean, it must return true if one of the squares adjacent to the coordinate box (i,j) is revealed and has no adjacent mine


Do you have some class which holds information whether it was revealed or not?  Do you have some method which tells how many bombs you have in adjacent tiles? Without having that information, obviously you couldn't return true or false, simply because you couldn't make a decision without such information.

You mentioned it is a group project, so I still don't fully understand what is your task. Just that one method to implement? If that's the case, you need to wait until somebody else done their job. Or you need to implement full game?


Hey! To answer you, no we are only 2 in our group and I have already done other functions of the project it's just that we are stuck on this one in particular!

And yes, we have a method that counts the number of adjacent mines, and also one that allows us to know if it is revealed.
2 weeks ago

Paul Clapham wrote:

Erwan Jumel wrote:from what I understand, the method must return true if the adjacent square is revealed and if it has no adjacent mine (the mine is the "-1" so the bomb!).



Not "the" adjacent square -- there's always more than one adjacent square. But other than that, do you have another question to ask?


Thank you for your answers, but I still don't see how to do it, thank you anyway!
3 weeks ago

Liutauras Vilda wrote:

ewen lmj wrote:The for (7,1) the function will return "true" , because it has an adjacent cell revealed and has no adjacent mine.


Could be, but what's then?

ewen lmj wrote:I had thought of making a "revealed" function


Word function on its own suggest, that it does somehting. For example, sums something, in which case Sum would be a good function name, draws something, in which case Draw would be a great function name.

And now you suggest Revealed (something what seems happened already in the past). What that supposed to mean/do? Maybe Reveal would be something what would make more sense... Anyway, that seem to be too early.


I suggest you stop thinking about particular function(s) and what they'd return.

Think about the game first. Do you understand the mechanics behind the game? For instance.. Simplest case is probably you guessed correctly, open (or reveal as discussed) the tile, and it is a bomb - game is over. Clear outcome? I'd think so.

Now, you click on the tile, and it isn't a bomb. How many kind of different conceptual scenarios could be in such case?

I guess what I'm trying to say - write down the game first, so you and everybody else understands what's happening behind the hood. Or algorithm so to speak. Once you understand actually how the game works - then would be much easier to start. Somewhere.



First of all thank you very much for your welcome! I'm French, and in France on the forums the welcome doesn't happen like that, you are all very kind.

Yes I understand what you mean, with a good understanding of the game it's easier to program, but from what I understand, the method must return true if the adjacent square is revealed and if it has no adjacent mine (the mine is the "-1" so the bomb!).
3 weeks ago
Hello everyone, I have a group project (the project is the game the "minesweeper" but we encounter a difficulty, we have a function that must return a boolean, it must return true if one of the squares adjacent to the coordinate box (i,j) is revealed and has no adjacent mine (a mine corresponds to a "-1" on the game, the little game being the project), for example we have :

  |A|B|C|D|E|F|G|H|I|J|
00| | |1|0|0|0|0|2| | |
01| | |1|0|0|0|1|3| | |
02| | |1|0|0|0|1|X| | |
03| | |1|0|0|1|2| | | |
04| | |1|1|1|2|X| | | |
05| | | | | | | |3| | |
06| | | | | | | | | | |
07|1|1| | | | | | |2| |
08|0|1| | | | | | | | |
09|0|1| | | | | | | | |
10|0|1| | | | | | | | |


The for (7,1) the function will return "true" , because it has an adjacent cell revealed and has no adjacent mine.

I had thought of making a "revealed" function and if the cell is revealed and has no adjacent mine, we return true;

I'm sorry if it's not clear ,I'm new! Let me know if you want more precision

Translated with www.DeepL.com/Translator (free version)
3 weeks ago