Share your repls and programming experiences

← Back to all posts
Memory Game Project Part 4
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
Clear console
WHILE true:
IF in test mode:
Output "You've ran the program in test mode"
Display game board with all slots revealed
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
ELSE:
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
IF board is full:
break out of loop
Change player turn
Display players' points
Display winner(s)
/