Share your repls and programming experiences

← Back to all posts
Memory Game Project Part 3
tr29038 (1)

Output rules of the game
Initialize 2d matrix consisting of sporadically placed integer pairs in the range of 1..BOARD_SIZE^2/2
Display generated board with revealed slots
Pause program
Clear console
WHILE true:
Output which player's turn it is
Display game board
Prompt player to input a possible match
Clear console
Display game board with player's match guess revealed
IF the guess was correct:
Increment current player's score
Output a message announcing the increase of score
Output a message announcing the guess was incorrect
conceal the slots' values on the board
Output current player's total score
Pause program
Clear console
Change player turn