Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 1005 Bytes

README.md

File metadata and controls

17 lines (10 loc) · 1005 Bytes

Mina-Swep-Array-Mine-Game

ArraySweeper is an engaging PHP game where two players strategically place and guess array index addresses, avoiding hidden mines set by their opponent. With limited attempts and alternating turns, it's a thrilling test of strategy and luck. ArraySweeper: A Minesweeper Adventure with arrays:

Players 1 and 2 begin by entering their names and selecting an array index [0-10] to place a mine.

A random script determines who will be the starting player.

The active player inputs an index address, avoiding the location chosen by the other player for a mine.

If the first player avoids the mine, the program congratulates with the message, "Congratulations! You are still alive."

Player 2 takes their turn, choosing an index address while avoiding the mine location selected by Player 1.

If the selected index address contains a mine, the program displays the message, "BOOM! You're dead!"

Each player is given three attempts to select an index address, alternating turns.