PWD Complete
PWD Complete
Submitted By:
1.Anushka Umesh Bhaat 3314
2.Niyati Gulab Khandare 3328
3.Rashmi Dayanand Pandey 3343
4. Gauri Laxmikant Purohit 3349
Guided By:
Prof. P. P. Deshpande
Submitted To:
DEPARTMENT OF COMPUTER ENGINEERING
GOVERNMENT POLYTECHNIC HINGOLI
Maharashtra State Board of Technical Education, Mumbai
CERTIFICATE
This is to certify that, Miss. 1.Anushka Umesh Bhaat 2.Niyati Gulab Khandare ,
3.Rashmi Dayanand Pandey, 4.Gauri Laxmikant Purohit Roll No. 3314, 3328,
3343, 3349 of Sixth Semester of Diploma in Computer Engineering of
Government Polytechnic Hingoli has completed the Micro Project satisfactorily in
course Management (22509) for the academic year 2024-25 as prescribed in the
curriculum.
Date : / /2025
Sign of the
Week Date Duration Work / Activity Performed Faculty
No in
Hrs.
1 10/01/25
1/2 INTRODUCTION OF PYTHON
2 10/01/25 1/4 Features Of Python
3 15/01/25 1 Advantages Of Python
Marks:-
Marks obtained
Marks for by the Total
Roll No. Name Of Student Group Work individual Marks
(06) based on viva (10)
(04)
3314 Anushka Umesh Bhaat
3328 Niyati Gulab Khandare
3343 Rashmi Dayanand Pandey
3349 Gauri Laxmikant Purohit
Signature:
Action plan: -
Name of the
Planned Planned responsible
Details of activity finish date Team
start date
Member
Sr. No.
1 10/01/25 15/01/25 Niyati G.
INTRODUCTION OF PYTHON Khandare
Features Of Python 10/01/25 17/01/25 Rashmi D.
2 Pandey
Advantages Of Python 15/01/25 22/01/25 Gauri L. Purohit
3
Disadvantages Of Python 17/01/25 24/01/25 Anushka U.
4 Bhaat
22/01/25 29/01/25 Niyati G.
5 Import The Required Modules Khandare
Creating a class each for the tokens 24/01/25 07/02/25 Rashmi D.
6 and the grids class grid Pandey
I would like to express my sincere gratitude to Prof. N.S. Jadhao for their valuable
guidance, support, and encouragement throughout this project. Their expertise, insight, and
advice have been instrumental in helping me to overcome challenges and achieve success. I
am truly grateful for their leadership and mentorship, which have been essential to my growth
and development asa professional. Thank you for your unwavering commitment to excellence
and for being an inspiration to us all.
Our sincere and whole hearted thanks Prof. B. P. Deosarkar, principal Government
Polytechnic, Hingoli for inspiring us to achieve highest goal. Last but not least I am also
thankful to my parents and friends who helped me a lot in finalizing the project within limited
time frame. Thank you.
The project begins by defining the concept of resources and categorizing them into renewable
and non-renewable types. It emphasizes the significance of The Ludo Game in the face of
global challenges such as climate change, overpopulation, and resource depletion. The study
focuses on key aspects such as resource planning, demand forecasting, cost control,
environmental impact, and sustainability practices.
A detailed analysis is carried out on methods and tools used in The Ludo Game, such as
inventory systems, project management software, and environmental management systems.
Real-life case studies and data are reviewed to illustrate the consequences of poor The Ludo
Game and the benefits of efficient practices. Strategies like the 5R concept (Reduce, Reuse,
Recycle, Recover, and Refuse), resource optimization, and renewable energy adoption are
also discussed.
The objectives of the project include understanding the principles of The Ludo Game,
evaluating current practices, identifying areas of improvement, and proposing innovative and
practical solutions that can be implemented at local and organizational levels.
In conclusion, this micro project underlines the urgent need for responsible and strategic The
Ludo Game. It encourages the adoption of sustainable practices to ensure that resources are
available for future generations while meeting present needs effectively and efficiently.
1. Introduction:
Ludo Game is a board game for two to four-player in which the players try to move their four
tokens from start to end by rolling a die at their turns. The turns are taken circularly by each
player.
In each turn, he/she throws a die and moves a token by the number appearing, aiming to reach
the end and trying to prevent the other player(s) from winning.
Ludo is a classic board game that originated from an ancient Indian game called Pachisi. It is a
strategy-based game played by 2 to 4 players, each controlling four tokens of a distinct color:
red, blue, green, or yellow.
The objective is to move all four tokens from the starting area to the home column by rolling a
die and following a predefined path on the board. Players must roll a six to bring a token into
play and can capture opponent tokens by landing on the same square, sending them back to
their starting area.
Ludo is known for its mix of luck and strategy, making it fun and unpredictable. It's popular
among people of all ages and has many modern digital versions available for mobile and online
play.
Enhances Strategic Thinking: Players need to plan their moves, decide when to attack
or defend, and think ahead—boosting their decision-making and planning skills.
Improves Patience and Focus: Since the game involves waiting for your turn and
carefully watching others' moves, it develops patience and concentration.
Promotes Social Interaction: It's a multiplayer game that encourages communication,
bonding, and healthy competition among friends and family.
Teaches Sportsmanship: Win or lose, players learn how to handle both outcomes with
grace, encouraging fair play and emotional balance.
Boosts Counting and Math Skills: Especially for kids, moving tokens by counting dice
rolls helps reinforce basic arithmetic.
Relieves Stress: Playing Ludo can be a fun way to unwind and reduce stress levels by
engaging in a light, entertaining activity.
1. import pygame
2. import random
3. from pygame.locals import *
4. import sys
5. from pygame import font
6. import time
Code explanation:
a. Pygame module helps in building in window and controls for the ludo game
class gridObj:
def _init_(self, bgColor, playerList, safe, coordinate):
self.bgColor = bgColor
self.playerList = playerList
self.safe = safe
self.coordinate = coordinate
class Token:
def _init_(self, Id, color, state, coordinate,size):
self.Id = Id
self.color = color
self.state = state
self.coordinate = coordinate
self.size=size
self.original_coordinate = coordinate
Code explanation:
a. The gridObj() class is for each grid on the window that decides the color at that particular
coordinate on the window.
cList = [(1, 6), (2, 6), (3, 6), (4, 6), (5, 6), (6, 5), (6, 4), (6, 3), (6, 2), (6, 1), (6, 0), (7, 0),
(8, 0), (8, 1),
(8, 2), (8, 3), (8, 4), (8, 5), (9, 6), (10, 6), (11, 6), (12, 6), (13, 6), (14, 6), (14, 7),(14, 8),
(13, 8),
(12, 8), (11, 8), (10, 8), (9, 8), (8, 9), (8, 10), (8, 11), (8, 12), (8, 13), (8, 14), (7, 14),(6,
14), (6, 13),
(6, 12), (6, 11), (6, 10), (6, 9), (5, 8), (4, 8), (3, 8), (2, 8), (1, 8), (0, 8), (0, 7),(0, 6)]
#RGBY
initPos=[[[1,1],[1,4],[4,1],[4,4]],[[10,1],[13,1],[10,4],[13,4]],[[1,10],[4,10],[1,13],[4,13]],
[[10,10],[10,13],[13,10],[13,13]]]
pnames=['R','G','B','Y']
height = 1000
width = 800
initx = 0
inity = 0
currentPlayer = 'R'
compTokensLoc=[[1,1],[1,4],[4,1],[4,4]]
n=2
withComputer=False
dice_clicked = False
move_list = []
diceValue = 6
Game_grid = [[-1 for _ in range(15)] for _ in range(15)]
colors=['white','red','green','yellow','blue','black']
colorMatrix = [[-1, -1, -1, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, -1, -1],
[-1, -1, -1, -1, -1, -1, 0, 2, 2, -1, -1, -1, -1, -1, -1],
[-1, -1, -1, -1, -1, -1, 2, 2, 0, -1, -1, -1, -1, -1, -1],
[-1, -1, -1, -1, -1, -1, 0, 2, 0, -1, -1, -1, -1, -1, -1],
[-1, -1, -1, -1, -1, -1, 0, 2, 0, -1, -1, -1, -1, -1, -1],
[-1, -1, -1, -1, -1, -1, 0, 2, 0, -1, -1, -1, -1, -1, -1],
[0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0],
a. [0, 1, 1, 1, 1, 1, 0, 5, 0, 4, 4, 4, 4, 4, 0],
b. [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0],
c. [-1, -1, -1, -1, -1, -1, 0, 3, 0, -1, -1, -1, -1, -1, -1],
for i in range(15):
for j in range(15):
ob = gridObj(colors[colorMatrix[i][j]], [], safeMatrix[i][j], coordinateMatrix[i][j])
Game_grid[i][j] = ob
for j in range(4):
for i in range(1,5):
p=initPos[j][i-1]
R= Token(pnames[j]+str(i), colors[j+1], 0, (50 *p[0] , 50 * p[1]), 20)
Game_grid[p[0]][p[1]].playerList.append(R)
def check(pos):
if pos in cList:
return True
else:
return False
def gridlocation(pos):
x = pos[0]
y = pos[1]
return (x // 50, y // 50)
def checkCollision(pList):
global currentPlayer
global Game_grid
new_list=[]
for p in pList:
if p.Id[0] == currentPlayer:
new_list.append(p)
else:
p.coordinates=p.original_coordinate
i=p.coordinates[0]//50
j=p.coordinates[1]//50
Game_grid[i][j].playerList.append(p)
return new_list
def checkId(pList):
global currentPlayer
for i in pList:
if i.Id[0] == currentPlayer:
return True
return False
def nextPlayer():
global n,currentPlayer
if(n==2):
if currentPlayer == 'R':
currentPlayer = 'B'
elif currentPlayer == 'B':
currentPlayer = 'R'
elif(n==3):
if currentPlayer == 'R':
currentPlayer = 'G'
elif currentPlayer == 'G':
currentPlayer = 'Y'
elif currentPlayer == 'Y':
currentPlayer = 'R'
elif(n==4):
if currentPlayer == 'R':
currentPlayer = 'G'
elif currentPlayer == 'G':
currentPlayer = 'Y'
elif currentPlayer == 'Y':
currentPlayer = 'R'
elif currentPlayer == 'B':
currentPlayer = 'R'
i. global DISPLAYSURF
a.def mainGame():
b. height = 1000
c.width = 800
d. pygame.init()
e.DISPLAYSURF = pygame.display.set_mode((height, width))
f. pygame.display.set_caption('PythonGeeks Ludo Game')
g. global cList,
initPos,pnames,initx,inity,currentPlayer,n,dice_clicked,move_list,diceValue,Game_grid,c
olors,colorMatrix, coordinateMatrix,safeMatrix,safeLocs,diceFaces
loc=compLoc(random.randint(1, 6))
dice_clicked == True
loc = gridlocation(event.pos)
if (loc[0] >= 16 and loc[0] <= 18 and loc[1] >= 6 and loc[1] <= 8 and
dice_clicked == False):
# dice_value = 6
diceValue = random.randint(1, 6)
dice_clicked = True
print(1)
flag = 0
for i in cList:
if p.Id[0] == currentPlayer:
flag = 1
if flag == 0:
nextPlayer()
dice_clicked = False
print(Game_grid[1][6].playerList)
Game_grid[1][6].playerList.append(Game_grid[loc[0]][loc[1]].playerList[0
])
Game_grid[1][6].playerList[-1].coordinates = (50 * 1, 50 * 6)
for p in Game_grid[1][6].playerList:
print(p.coordinates)
Game_grid[loc[0]][loc[1]].playerList = []
dice_clicked = False
print(3)
print(Game_grid[8][1].playerList)
Game_grid[8][1].playerList.append(Game_grid[loc[0]][loc[1]].playerList[0
])
Game_grid[8][1].playerList[-1].coordinates = (50 * 8, 50 * 1)
Game_grid[loc[0]][loc[1]].playerList = []
print(Game_grid[8][1].playerList[0].Id)
dice_clicked = False
print(5)
print(Game_grid[6][13].playerList)
Game_grid[6][13].playerList.append(Game_grid[loc[0]][loc[1]].playerList[
0])
Game_grid[6][13].playerList[-1].coordinates = (50 * 6, 50 *
13)
Game_grid[loc[0]][loc[1]].playerList = []
dice_clicked = False
print(4)
print(Game_grid[13][8].playerList)
Game_grid[13][8].playerList.append(Game_grid[loc[0]][loc[1]].playerList[
0])
Game_grid[loc[0]][loc[1]].playerList = []
dice_clicked = False
elif currentPlayer == 'R' and (loc in [(1, 7), (2, 7), (3, 7), (4, 7), (5,
7)]) and len(
Game_grid[loc[0] +
diceValue][loc[1]].playerList.append(Game_grid[loc[0]][loc[1]].playerList[
-1])
Game_grid[loc[0] + diceValue][loc[1]].playerList[-
1].coordinates = (
50 * (loc[0] + diceValue), 50 * (loc[1]))
Game_grid[loc[0]][loc[1]].playerList =
Game_grid[loc[0]][loc[1]].playerList[:-1]
dice_clicked = False
elif currentPlayer == 'G' and (loc in [(7, 1), (7, 2), (7, 3), (7, 4), (7,
5)]) and len(
Game_grid[loc[0]][loc[1] +
diceValue].playerList.append(Game_grid[loc[0]][loc[1]].playerList[-1])
Game_grid[loc[0]][loc[1] + diceValue].playerList[-
1].coordinates = (
Game_grid[loc[0]][loc[1]].playerList =
Game_grid[loc[0]][loc[1]].playerList[:-1]
dice_clicked = False
elif currentPlayer == 'B' and (loc in [(7, 9), (7, 10), (7, 11), (7,
12), (7, 13)]) and len(
Game_grid[loc[0]][loc[1] +
diceValue].playerList.append(Game_grid[loc[0]][loc[1]].playerList[-1])
Game_grid[loc[0]][loc[1] + diceValue].playerList[-
1].coordinates = (
dice_clicked = False
elif currentPlayer == 'Y' and (loc in [(9, 7), (10, 7), (11, 7), (12,
7), (13, 7)]) and len(
Game_grid[loc[0] -
diceValue][loc[1]].playerList.append(Game_grid[loc[0]][loc[1]].playerList[
-1])
Game_grid[loc[0] - diceValue][loc[1]].playerList[-
1].coordinates = (
Game_grid[loc[0]][loc[1]].playerList =
Game_grid[loc[0]][loc[1]].playerList[:-1]
dice_clicked = False
print(6)
new_list = []
flg = 0
for i in Game_grid[loc[0]][loc[1]].playerList:
Game_grid[newpos[0]][newpos[1]].playerList.append(i)
Game_grid[newpos[0]][newpos[1]].playerList[-
1].coordinates = (50 * newpos[0], 50 * newpos[1])
#eating pieces
Game_grid[newpos[0]][newpos[1]].playerList=checkCollision(Game_grid[
newpos[0]][newpos[1]].playerList)
flg = 1
else:
new_list.append(i)
Game_grid[loc[0]][loc[1]].playerList = new_list
dice_clicked = False
if diceValue != 6:
nextPlayer()
# pygame.display.update()
pygame.display.update()
if event.type == QUIT:
pygame.quit()
sys.exit()
15. Code Of The Main Window
pygame.init()
clock = pygame.time.Clock()
class Button:
self.no=num
self.text=text
self.cmp=comp
self.change_text(bg)
self.size = self.text.get_size()
self.surface = pygame.Surface(self.size)
self.surface.fill(bg)
self.surface.blit(self.text, (0, 0))
def show(self):
x, y = pygame.mouse.get_pos()
if event.type == pygame.MOUSEBUTTONDOWN:
if pygame.mouse.get_pressed()[0]:
if self.rect.collidepoint(x, y):
global n,withComputer
n=self.no
withComputer=self.cmp
print(n,",",withComputer)
pygame.quit()
mainGame()
def mainloop():
if event.type == pygame.QUIT:
pygame.quit()
button1.click(event)
button2.click(event)
button3.click(event)
button4.click(event)
button1.show()
button2.show()
button3.show()
button4.show()
clock.tick(30)
pygame.display.update()
button1 = Button(
(400, 150),
font=30,
bg="navy")
button2 = Button(
"2 Players",2,False,
(400, 250),
font=30,
bg="navy")
button3 = Button(
"3 Players",3,False,
(400, 350),
font=30,
bg="navy",)
button4 = Button(
"4 Players",4,False,
(400, 450),
font=30,
bg="navy",)
Output
16. Conclusion
The game of Ludo concludes when one player successfully brings all
four of their tokens to the home triangle. It is a game of both strategy
and luck, requiring tactical moves and careful risk management. The
winner is the first to finish, but the journey is equally engaging for all
players.