Skip to content

Chien179/Puzzle_Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Puzzle Game

puzzleGame

Contributors

  • Minh Chien Nguyen
    ID: 19110173

  • Phi Anh Pham
    ID: 19110512

Description

Puzzle Game is a game which the player is expected to move pieces in a logical way, in order to reach at the inital state of the provided image, players can also choose any images from their local computers. The game was implemented in Python using Pygame.

A* algorithm is used in this project to assist identify the quickest path.

Prerequisites

  • Make sure your machine had installed python3.9, pygame, numpy and tkinter.
  • You are using a Windows machine.
  • If you haven't installed any of these, you can install python3.9 and libraries.
pip install pygame
pip install numpy
pip install tkinter

Jump In The Game

  • Locate and open main.py in source folder src to play the game.
  • After clicking on Shuffle button, you can use your cursor to interact with the puzzle.

Features

  • Shuffle function performs random moves.
  • Solve funtion solves the Puzzle using A* algorithm.
  • Hint funtion indicates best move possible so as to reach the initial images.
  • File funtion uses the selected image in your local machine as the puzzle itself.

References

https://www.pygame.org/docs/
https://yinyangit.wordpress.com/2010/12/11/algorithm-tim-hiểu-về-bai-toan-n-puzzle-updated/
https://stackoverflow.com/questions/16235564/convert-1d-array-into-numpy-matrix/16235630
https://www.youtube.com/watch?v=XRqA6RQr3SQ&ab_channel=APCRPDEE

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages