Minesweeper is a single-player game. The player is initially presented with a grid of undifferentiated squares. Some randomly selected squares, unknown to the player, are designated to contain mines. The game is played by revealing squares of the grid by clicking them with a mouse. If a square containing a mine is revealed, the player loses the game. Otherwise, a digit is revealed in the square, indicating the number of adjacent squares that contain mines. The game is won when all mine-free squares are revealed, meaning that all mines have been located.