Home >Backend Development >PHP Tutorial >Share an interesting php version of Minesweeper!
This article will share with you a PHP version of Minesweeper written by a netizen. It is quite interesting and you can learn while playing~
github address: https://github.com/maxiao64/ MineWeeper
#How to set game parameters?
Open the startup PHP file, you can see that several parameters are set when creating the MineWeeper object, namely the number of rows, the number of columns and the number of bombs
How to start the game?
php start.php
Review
If there is a garbled code problem: The garbled code problem is the default of the windows window The encoding is gbk. The emoji expression I used for mine is utf-8 encoding, so it is garbled. Therefore, you can try to enter chcp 65001
in the window. This command changes the encoding of the window to utf-8
, try again, it should not be garbled.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of Share an interesting php version of Minesweeper!. For more information, please follow other related articles on the PHP Chinese website!