Memory game in Python

Overview

Concentration - Memory Game

Concentration is a memory game written in Python, inspired by memory-game.

Description

As stated in the introduction of the game:

Welcome to Concentration!

This is a memory game in which you guess two cards.
If the faces of the cards match, you win the pair
and they remain face up. Don't waste a turn!

This program is a replication of my memory game in x86 assembly language, memory-game, in Python.

Usage

First, the game will display an introduction which includes the welcome screen and an overview of the game.

Enter any number (or any value for that matter), followed by the enter key to continue with the game.

Welcome to Concentration!

This is a memory game in which you guess two cards.
If the faces of the cards match, you win the pair
and they remain face up. Don't waste a turn!

Enter any number to CONTINUE: 5

The game will then print the cards, which all begin face-down by default, and prompt you to "guess a card."

■ ■ ■ ■
■ ■ ■ ■
■ ■ ■ ■
■ ■ ■ ■

Guess a card:

The cards are labeled 1 to 16, with 1 starting at the top-left corner and continuing left-to-right.

1 2 3 4
5 . . .

The game will print the cards again (with your guessed card face-up) and prompt you to guess again.

<!-- In this example, the number 1 will be entered as the first guess. -->

Guess a card: 1

☺ ■ ■ ■
■ ■ ■ ■
■ ■ ■ ■
■ ■ ■ ■

Guess a card: 

If you make an invalid guess, the game will prompt you to guess again, repeating until you make a valid guess.

A guess is invalid when:

  • the guess is non-numeric
  • the guess is out of bounds
  • the guess has already been chosen or matched
<!-- In this example, the number 0 will be entered as an invalid guess. -->

Guess a card: 0

Invalid input. Please try again.

Guess a card:

After another valid guess, the game will print the cards a third time. The game will compare the two cards you guessed.

The game will report "match" or "no match," and then a pause in the game will take place.

During this pause, you can choose to either quit or continue the game.

<!-- In this example, the number 9 will be entered as the second guess. -->

Guess a card: 9

☺ ■ ■ ■
■ ■ ■ ■
♠ ■ ■ ■
■ ■ ■ ■

No match. :(

Enter 0 to QUIT. Enter any other number to CONTINUE:

If you enter 0 during this pause, the game will display a message and end the game.

<!-- In this example, the number 0 will be entered during the pause, ending the game. -->

Enter 0 to QUIT. Enter any other number to CONTINUE: 0

Thanks for playing!

Otherwise, the game will continue until all the cards are face-up (you have made all the matches).

Good luck! I hope you enjoy the game. :D

You might also like...
Quantum version of the classical Nim game. An automatic opponent allows to game to not be as easy as it seems.

Nim game Running the game To run the program just launch : python3 game.py Rules This game is inspiring from the Nim game. You are 2 players face to f

Deal Or No Deal was a very popular game show. Even now, for a family party, it's a fun game to pass time

Deal Or No Deal was a very popular game show. Even now, for a family party, it's a fun game to pass time. I made a code to play the game right in your terminal/console. This isn't made to be a game which can be installed by everyone and played, I just made it as a fun project as I just started out with python. So if you have python installed and wanna have some fun, or just curious to see how I did this, feel free to check the code out!

Mastermind-Game - A game to test programming and logical skills

Bem vindo ao jogo Mastermind! O jogo consiste em adivinhar uma senha que será ge

Quiz Game: answering questions naturally with a friendly UI to enjoy the game
Quiz Game: answering questions naturally with a friendly UI to enjoy the game

About Quiz Game : The Game is about answering questions naturally with a friendl

This is a simple telegram bot for the game Pyal, a word guessing game inspired by Wordle

Pyal Telegram Bot This is a simple telegram bot for the game Pyal, a word guessing game inspired by Wordle. How does it work? Differently from the ori

Create a Hangman Game using Python and all techniques of Python.
Create a Hangman Game using Python and all techniques of Python.

Hangman Game Created by Fernando Callasaca Game rules: Choose a word and if you guess it will appear completed. In case it is not the word then the ma

A Pygame Hangman Game coded in Python 3. Run Hangman.py in a terminal if you have Python 3

Hangman A Pygame Hangman Game coded in Python 3. Run python3 Hangman.py in a terminal if you have Python 3.

This is a python interactive story game that I made to show off what I've learnt in python coding for a month

Purpose The files in this repository are for that of a story game created with python version 3.8.5 The purpose of this project was to get familiar wi

Simple Game created using Python & PyGame, as my Beginner Python Project!
Simple Game created using Python & PyGame, as my Beginner Python Project!

Space Invaders This is a simple SPACE INVADER game create using PYGAME whihc have sound and lot's of keyboard functions. Prerequisites More Experience

Owner
Marco Colonna
CS @ UM-Flint
Marco Colonna
Playing memory game is fun and the more harder it is the more challenging it is.

Playing memory game is fun and the more harder it is the more challenging it is. Playing thi sgame make us stress free and also happy. So, I have decided to make a memory Game which people can play while doing work. To pass your time and to be little happy, play this wonderful memory game - **JACKPOT** while doing your work and sitting in front of your computer.

Shreejan Dolai 3 Nov 11, 2022
Mandaw 2 Mar 1, 2022
Average Clicker Game (AVG) is a Python made game using tkinter

Average-Clicker-Game Average Clicker Game (AVG) is a Python clicker game not made with pygame but with tkinter, it has worker, worker upgrades, times

Zacky2613 1 Dec 21, 2021
Ice-Walker-Game - This repository is about the Ice Walker game made in Python.

Ice-Walker-Game Ce dépot contient le jeu Ice Walker programmé en Python. Les différentes grilles du jeu sont contenues dans le sous-dossier datas. Vou

Mohamed Amine SABIL 1 Jan 2, 2022
Adventure-Game - Adventure Game which is created using Python

Adventure Game ?? This is a Adventure Game which is created using Python. Featur

ArinjoyTheDev 1 Mar 19, 2022
Game-of-life - A simple python program to simulate and visualise the Conway's Game of life

Conway's game of life A simple python program to simulate and visualise the Conw

Dhravya Shah 3 Feb 20, 2022
Snake game mixed with Conway's Game of Life

SnakeOfLife Snake game mixed with Conway's Game of Life The rules are the same than a normal snake game but you have to avoid cells created by Conway'

Aidan 5 May 26, 2022
Lint game data metafiles against GTA5.xsd for Rockstar's game engine (RAGE)

rage-lint Lint RAGE (only GTA5 at the moment) meta/XML files for validity based off of the GTA5.xsd generated from game code. This script accepts a se

GoatGeek 11 Sep 18, 2022
HTTP API for FGO game data. Transform the raw game data into something a bit more manageable.

FGO game data API HTTP API for FGO game data. Transform the raw game data into something a bit more manageable. View the API documentation here: https

Atlas Academy 51 Dec 26, 2022
A near-exact clone of google chrome's no internet game, or the "google dinosaur game", with some additions and extras.

dinoGame A near-exact clone of google chrome's no internet game, or the "google dinosaur game", with some additions and extras. Installation Download

null 1 Oct 26, 2021