Minesweeper (Part 7/16)

  • 3
  • Locked
At this stage, we'll deal with the logic to reveal cells. Let's create a corresponding method and a variable that will store the cell state (revealed or hidden). When revealing a cell, the method will: - draw a mine in the cell if it contains a mine; - display the number of mined neighbors if the c
You can't complete this task, because you're not signed in.
Comments (6)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
WIDMO
Level 41 , Gdańsk, Poland
8 April 2020, 20:46
I've stuck with those 2 errors. Can anybody help? My code's compiling and is working nicely. Should I pay special attention on something or is it just a bug?
AP
Level 15 , Bodmin, United Kingdom
6 September 2020, 23:50
The problem is that the coordinates x,y corresponds to object y,x but for functions like setCellColor you need to pass coordinates x,y only. Hope this helps.
Ryan Woodward
Level 3 , Vancouver, Canada
26 October 2020, 22:34
I have the same issue. When I run the code in intelliJ everything works perfectly. However it keeps coming up with bugs in the verification.
JOJO
Level 3 , XI'AN, China
4 March 2021, 12:27
gameField[y][x].isOpen = true; try it.
JOJO
Level 3 , XI'AN, China
4 March 2021, 12:28
YX order is important
JOJO
Level 3 , XI'AN, China
4 March 2021, 12:30
The previous formula for creating an object is this "gamefield [y] [x] = new GameObject (x, y, ismine);"