Hello everyone!
I’m quite new to phaser and after some tutorials, I wanted to recreate an old game of mine. It’s basically minesweeper, but you have to navigate a snake through the maze, while you mark the mines. I’m using Phaser 3.15.1 with node.js 9.10.1 on CentOS 7.
I started by preloading my assets and write the functions to create a random generated game-field.Here is the code:
https://pastebin.com/PfNiFdRK
The random generator creates “free” and “occupied” fields. Free fields should recieve a number inicially to indicate the amount of adjacent mines. The result is pretty much as I expected, but at x=63 y=17, there is always the number, regardless of a occupied field or not, as you can see in the following screenshot:
I tested this with Firefox 64.0 (64 bit) on Windows 7.
Unfortunatly, I develop this offline, so I can’t give you the address to test it for youself.
I hope, someone can tell me, what I did wrong, or what I should do to get this to work. The code is very awful, since I did not work much with javascript. I’m very open to suggestions.
With kind regards and happy holidays!
Schmiddae