Skip to content

chaonan99/step_and_turn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Step and Turn Game!

  • This is my AI project for graph search.
  • Use pygame framework.
  • Test on Windows10.

Game rules

  • Two players take turns to action.
  • There are pieces and obstacles on the board, and each player controls some pieces.
  • Each piece has four directions. The possible actions of the pieces are to step forward in the current direction (step) and to turn left or right (turn).
  • When a player is on the turn, the player chooses a piece to step, then selects a piece to turn. The selected pieces can be the same or different.
  • The moved piece cannot overlap with obstructions and other chess pieces.
  • The first player who can not move is sentenced to failure!

UI design

  • Start up page start
  • Main UI ui
  • Hints
    • stephint
    • turnhint

How to make contribution

You are always welcomed to contribute to this project!

  • If you find a bug, open a new issue.
  • If you want to design a new map, see the examples in src/stepturnLevel.txt and add your own secretly or make a pull request.
  • And there are definately bugs in the code for someone to fix...

Acknowledge

  • Sweigart's pygame book and star pusher example helps me a lot. This game is adapted from his star pusher game.
  • AI framework provided by easyAI. I've made some changes to adapt to this game (You don't need to install this package).

TODOs

  • Better game solving strategies when map is very big.
  • Hint of AI moves.
  • AI algorithm with parallelisation. Currently there is no response to user input when AI is searching.
  • Better UI framework.

Other random things...