If you want to build a simple game in Python ,this project is for you . A very simple PACMAN game ... The source code for PACMAN .. from random import choice from turtle import * from freegames import floor , vector # pip install freegames state = { 'score' : 0 } path = Turtle( visible = False ) writer = Turtle( visible = False ) aim = vector( 5 , 0 ) pacman = vector(- 40 , - 80 ) ghosts = [ [vector(- 180 , 160 ) , vector( 5 , 0 )] , [vector(- 180 , - 160 ) , vector( 0 , 5 )] , [vector( 100 , 160 ) , vector( 0 , - 5 )] , [vector( 100 , - 160 ) , vector(- 5 , 0 )] , ] tiles = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 1 , 0 , 0 , 1 , 0 , 1 , 0 , 0 , 1 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 1 , 0 , 1 , 0 , 0 , 0 , 1 , 0 , 1