Skip to content

Repository files navigation

🎮 Python Games


About project :

  • Python Games — a collection of small console-based games developed while learning and practicing Python.
  • The repository contains several independent games focused on programming fundamentals, game logic, algorithms, and working with user input.

Technologies and Tools :

  • Python
  • Git
  • GitHub

How to run :

  • Clone the repository.
  • Select the required game.
  • Run the corresponding .py file using Python.

Games :

🎲 Guess the Number


About game :

  • Guess the Number is a console-based game where the player tries to guess a randomly generated number within a specified range.

Game rules :

  • The player has a limited number of attempts to guess the hidden number.
  • The range and number of attempts can be configured.

Source code :

Demonstration :

Game_guess_number_scr

🎲 Text Role-Playing Game


About game :

  • Text Role-Playing Game is a console-based adventure game inspired by classic stories about warriors, castles, and dangerous adventures.

Game rules :

  • The player reads story events and makes choices that determine how the adventure continues.

Source code :

Demonstration :

Game_text_rpg

🎲 "Tic-tac-toe"


About game :

  • Tic-Tac-Toe is a logical game for two players played on a 3×3 square grid.
  • One player uses crosses, while the other uses noughts.

Game rules :

  • Players take turns placing their symbols in empty cells.
  • The first player to get three symbols in a row horizontally, vertically, or diagonally wins.

Source code :

Demonstration :

Game_tic_tac_toe_scr Game_tic_tac_toe_scr

🎲 "Battleship"


About game :

  • Battleship is a two-player strategy game in which players take turns attacking coordinates on their opponent's hidden board.
  • The goal is to sink all of the opponent's ships before they sink yours.

Game rules :

  • Each player has a 10×10 playing field with a fleet of ships.
  • The fleet consists of 1 ship of four cells, 2 ships of three cells, 3 ships of two cells, and 4 single-cell ships.
  • Ships can only be placed horizontally or vertically.
  • Ships cannot be placed next to each other.

Source code :

Demonstration :

Game_battle_ship_scr_1 Game_battle_ship_scr_2

🎲 "Minesweeper"


About game :

  • Minesweeper is a console-based puzzle game where the player must open cells without hitting hidden mines.
  • In this implementation, the player receives points for each successfully opened cell.

Game rules :

  • The playing field is divided into cells, some of which contain hidden mines.
  • The player opens cells while trying to avoid mines.
  • Opening a mined cell ends the game.
  • The goal is to open all cells that do not contain mines.

Source code :

Demonstration :

Game_mine_sweeper_scr_1

About

🕹️ ⚔️ A collection of Python game projects, including Tic-Tac-Toe, Battleship, text-based RPG, and Guess the Number.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages