Implementation of the famous puzle Tower of Hanoi

Overview

Tower_of_Hanoi

Implementation of the famous puzle "Tower of Hanoi". The setup consists of three pegs (sticks) and a certain amount of discs (in this implementation there can be a maximum of 6 discs). The discs have different sizes, and are placed on top of each other sorted from the biggest to the smallest. game start

Goal

Move all the discs from the first peg to the third. Additionally you can try to win in less moves as possible. The number of moves is shown at the top left corner of the screen.

game won

Rules

  • You can only move one disc at the time;
  • You can only place a disc on pegs with no discs, or on top of a bigger disc;

How to play

1- Press the blue button under the peg on which the disc you want to move is on (this will make it light up);

2- Press the blue button under the peg where you want to place the disc;

Example of an ongoing match

middle game

You might also like...
A simple pygame implementation of the LOGO programming language.
A simple pygame implementation of the LOGO programming language.

LOGO-py A simple pygame implementation of the LOGO programming language. Latest Version Notes Fixed a bug where penup/pendown would not work properly.

Implementation of the Spider-Man Game
Implementation of the Spider-Man Game

Projeto FPRO FPRO/LEIC, 2021/22 Francisco Campos (up202108735) 1LEIC08 Objetivo Criar um clone do clássico Spider-Man em Pygame... Repositório de códi

j-chess implementation in python

j-chess-client-python This repository aims to be a starting point for implementing a chess ai for the j-chess-server in python. To start, you can copy

A pygame implementation of John Conway's Game of Life
A pygame implementation of John Conway's Game of Life

Game of Life A Pygame Simulation This is a Pygame implementation of the famous Conway's Game of Life. The game features a set of very simple rules: An

This is a python implementation of wordle, which uses the same set of available words as the hit game, Wordle

Wordle Game This is a python implementation of wordle, which uses the same set of available words as the hit game, Wordle. Play the game manually pyth

A pure python implementation of a solver for the popular game wordle.

A pure python implementation of a solver for the popular game wordle.

Wordle - Implementation of wordle and a solver

Wordle - Implementation of wordle and a solver

PLVRA is a TUI (Terminal User Interface) implementation of wordle / termo in portuguese, written in Python

PLVRA is a TUI (Terminal User Interface) implementation of wordle / termo in portuguese, written in Python

An implementation of John Conway's Game of Life.

This is an implementation of John Conway's Game of Life in Python, and a very basic and straightforward one at that.

Owner
Raffaele Fiorillo
Let code be the tool to make your dreams become reality!
Raffaele Fiorillo
Inflitator is a classic doom and wolfenstein3D like game made in Python, using the famous PYGAME module.

INFLITATOR Raycaster INFLITATOR is a raycaster made in Python3 with Pygame. It is a game built on top of a simple engine of the same name. An example

Zanvok Corporation 1 Jan 7, 2022
a game of life implementation in python

gameoflife-py python implementation of game of life Installing As long as you have bash and curl installed and are on Linux the install script should

Raghav 5 Jun 9, 2021
Implementation of Conway's game of life in python.

?? ????‍?? Conway's Game of Life ????‍?? ?? by FranciscoCharles An interactive simulator that implements the standard Conway Game of Life with a simpl

null 3 Oct 1, 2021
PyUnity is a Python implementation of the Unity Engine, written in C++

PyUnity is a Python implementation of the Unity Engine, written in C++. This is just a fun project and many features have been taken out to make it as easy as possible to create a scene and run it.

PyUnity 206 Jan 3, 2023
Rudimentary CMD based implementation of the Tic Tac Toe game

Packages used: questionary random os (Requires Python >3.8 as walrus operators are used in the script) Contains the .py file (tictactoe.py) and an exe

Ashwin 1 Oct 15, 2021
An interactive pygame implementation of Conway's Game of Life

Game of Life An interactive pygame implementation of Conway's Game of Life Installation Clone the repo and navigate into it. git clone https://github.

Ethan 1 Dec 5, 2021
An interactive pygame implementation of quadtree spatial quantization

QuadTree-py An interactive pygame implementation of quadtree spatial quantization Contents Installation Usage API Reference TODO Installation Clone th

Ethan 1 Dec 5, 2021
Simple implementation of the classic Snake Game in under 100 lines of code

Snake_Game Simple python implementation of the classic Snake Game in under 100 lines of code. Printscreen of the game: Imported Libraries: random; pyg

Raffaele Fiorillo 2 Jun 13, 2022
Official PyTorch implementation of NAC from the paper: Neural Auto-Curricula in Two-Player Zero-Sum Games.

NAC Official PyTorch implementation of NAC from the paper: Neural Auto-Curricula in Two-Player Zero-Sum Games. We release code for: Gradient based ora

Xidong Feng 19 Nov 11, 2022
A Game of Life implementation in Python

Game of Life in Python (Golipy) Golipy is a simulator of John H. Conway's Game of Life, developed in Python based on the Pygame library. This is a toy

Alber 2 Dec 10, 2021