Repository files navigation
The game "Guess the number" in a given range (you can set the range yourself).
You need to guess the hidden number, while there are only a few attempts.
A little practice while learning.
Visualization is carried out by means of data output to the console.
The game does not have a graphical interface .
File name: game_guess_number.py
Open code for viewing.
Copy the code to a new file with extension ".py".
Open the created file with the .py extension in any IDE.
🎲 "Text role-playing game"
"Text role-playing game". In the style of old games about warriors and castles with princesses. Dangerous adventures are waiting for you! :)
Read stories taken according to the plot, and then the choice is yours, warrior.
A little practice while learning.
Visualization is carried out by means of data output to the console.
The game does not have a graphical interface .
File name: game_text_rpg.py
Open code for viewing.
Copy the code to a new file with extension ".py".
Open the created file with the .py extension in any IDE.
"Tic-tac-toe" is a logical game between two opponents on a 3 by 3 square field.
One of the players plays with "crosses", the second - with "tac-toes".
Players take turns putting 3 by 3 signs on the free cells of the field (one is always crosses, the other is always zeros).
The first one to line up 3 of their pieces vertically, horizontally or diagonally wins.
It was a test task at the school where I study.
Visualization is carried out by means of data output to the console.
The game does not have a graphical interface .
File name: game_x_o.py
Open code for viewing.
Copy the code to a new file with extension ".py".
Open the created file with the .py extension in any IDE.
"Battleship" is a game for two participants in which players take turns naming coordinates on an opponent's unknown map.
The goal of the player is to be the first to sink all enemy ships.
The playing field is usually a 10x10 square for each player, on which a fleet of ships is placed.
Horizontals are usually numbered from top to bottom, and verticals from left to right.
Each player has: 1 ship (row of 4 cells), 2 ships (row of 3 cells), 3 ships (row of 2 cells) and 4 ships (1 cell).
Players can only place ships vertically or horizontally.
It is forbidden to connect ships together.
It was a test task at the school where I study.
Visualization is carried out by means of data output to the console.
Some objects in the game have been recolored for better visualization.
It is also possible to change the original colors.
The game does not have a graphical interface .
File name: game_battle_ship.py
Open code for viewing.
Copy the code to a new file with extension ".py".
Open the created file with the .py extension in any IDE.
"Minesweeper" is a puzzle game.
The goal of the game is to open empty cells and not step on a mine.
In this implementation of the game, the player receives points for each open cell.
The flat playing field is divided into cells, some of which are "mined".
The number of "mined" cells is not known.
The player opens the cells, trying not to open a cell with a mine.
Having opened a cell with a mine, he loses.
The goal of the game is to open all cells that do not contain mines.
I just wanted to do it for myself.
Visualization is carried out by means of data output to the console.
Some objects in the game have been recolored for better visualization.
It is also possible to change the original colors.
The game does not have a graphical interface .
File name: game_mine_sweeper.py
Open code for viewing.
Copy the code to a new file with extension ".py".
Open the created file with the .py extension in any IDE.
About
🕹️ ⚔️ Game projects (so far: Tic-Tac-Toe, Sea Battle, text-based RPG, Guess the Number).
Topics
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.