Pyp Mic
Pyp Mic
EDUCATION
GOVERNMENT POLYTECHNIC JALGAON
(0018)
Semester : Sixth
A MICRO PROJECT ON
Certificate
This is to certify that Saurab Bagul, Jitesh Barhate, Lokesh Dhangar Roll No.5,6,42
of 6th Semester of Diploma in Computer Engineering of Government Polytechnic,
Jalgaon (Code:0018) has completed the Micro Project satisfactorily in the subject
Programming With Python(22616) for the Academic Year 2023-2024 as prescribed
in the curriculum.
Seal of institution
GOVTERNMENT POLYTECHNIC JALGAON
-SUBMISSION
We are Saurabh Bagul, Jitesh Barhate, Lokesh Dhangar students of 6th Semester
of the Programme Computer Engineering humbly submit that we have completed
from time to time the Micro-Project work as described in this report by y our own skills
and study in academic year 2023-2024 as per instructions and guidance Amol
Chaudhari Sir that following students were associated with me for this work,
however, quantum of my contribution has been approved by the Lecturer.
And that I have not copied the report on its any appreciable part from any other
literature in contravention of the academic ethics.
06 –
42 -
WEEKLY PROGRESS REPORT
Week Abstract
3 Literature Review
4 Collection of Data
5 Collection of Data
Second
6 Week Discussion and outline of Content
7 Formulation of Content
11 Viva voce
This Micro project would not have been possible without considerable
guidance and support. So, we would like to acknowledge those who have
enable us to complete this project.
Firstly, we would like to thank our project guide, Amol Chaudhari sirfor
providing the guideline with continuous advice and feedback throughout the
duration of finishing this project. We also thank to Dr P. M. Patil
(principal of Government Polytechnic Jalgaon) for providing us the
opportunity to embark on this project.
Secondly, we would also like to thank all other staff members of Computer
department that we may called upon for assistance since the genesis of this
project their opinion and suggestion have helped us in a realizing these
projects.
Also not to be forgotten, we would like to thank all our friends with the
report valuable opinion and sharing ideas during the process of this project.
Finally, we would like to thank our families for their understanding,
encouragement and support towards the completion of project.
1. Abstract
2. Introduction
3. Source Code
4. Outputs
5. Conclusion
6. Refernces
PART A: A MICROPROJECT PROPOSAL
CHESS GAME
3.0: Methodology :
Firstly, we have study python language packages then
we have analysed attributes, packages of Machine
Learning . We gain the knowledge about that system
with the working of it. We have gained knowledge
about Various packages like face- recognition, numpy
etc in python.
4.0 : Action plan
Sr Detail of Activity Plan Start Plan finish Name of responsible
No. Date Date team members
1 Discussion and
finalization of topic 05 :
2 Preparation and Saurabh
submission of Abstract Bagul
3 Literature Review
06: Jitesh
4 Collection of Data Barhate
42: Lokesh
5 Collection of Data Dhangar
6 Discussion and outline
of Content
7 Formulation ofcontent
10 Seminar
11 Viva voce
CHESS GAME
1.0 Rationale
Prepare a report on Chess Game .
2.0 Aim/Benefits of the micro-project
Aim of the project is preparing report on Chess Game
3.0 Course Outcome Addressed
a) To study about the Python and Machine Learning.
b) Make an Project on Chess Game.
c) To solve real world problems.
Chess, often hailed as the "game of kings," stands as a testament to human intellect
and strategic prowess. With its origins dating back over a millennium, chess has
evolved into a universal language, transcending borders and cultures. In the modern
era, the fusion of technology and tradition has brought chess to digital platforms,
making it accessible to players worldwide. This Python project seeks to immerse users
in the captivating realm of chess, offering a digital rendition of this age-old classic.
Through intuitive interfaces and intricate algorithms, players will engage in battles of
wit and strategy, whether challenging a computer opponent or competing against
fellow enthusiasts online. By delving into this project, users embark on a journey
where every move becomes a calculated step towards victory, further perpetuating the
timeless allure of chess in the digital age.
This Python-based chess project serves as a gateway to this rich tradition, offering an
immersive and interactive experience for players of all levels. By harnessing the power
of Python's versatility and simplicity, this endeavor aims to deliver a user-friendly
interface coupled with robust gameplay mechanics. Whether one seeks to sharpen their
skills against a sophisticated AI adversary or engage in friendly competitions with
peers, this project promises to provide a fulfilling and intellectually stimulating chess
experience.
Source Code
# Importing Modules
import pygame
timer = pygame.time.Clock()
fps = 60
captured_pieces_white = []
captured_pieces_black = []
# 0 - whites turn no selection: 1-whites turn piece selected: 2- black turn no selection, 3 - black turn piece selected
turn_step = 0
selection = 100
valid_moves = []
# load in game piece images (queen, king, rook, bishop, knight, pawn) x 2
black_queen = pygame.image.load('D:\\python\\pygame\\images\\black_queen.png')
black_queen = pygame.transform.scale(black_queen, (80, 80))
black_queen_small = pygame.transform.scale(black_queen, (45, 45))
black_king = pygame.image.load('D:\python\pygame\images\\black_king.png')
black_king = pygame.transform.scale(black_king, (80, 80))
black_king_small = pygame.transform.scale(black_king, (45, 45))
black_rook = pygame.image.load('D:\python\pygame\images\\black_rook.png')
black_rook = pygame.transform.scale(black_rook, (80, 80))
black_rook_small = pygame.transform.scale(black_rook, (45, 45))
black_bishop = pygame.image.load('D:\python\pygame\images\\black_bishop.png')
black_bishop = pygame.transform.scale(black_bishop, (80, 80))
black_bishop_small = pygame.transform.scale(black_bishop, (45, 45))
black_knight = pygame.image.load('D:\python\pygame\images\\black_knight.png')
black_knight = pygame.transform.scale(black_knight, (80, 80))
black_knight_small = pygame.transform.scale(black_knight, (45, 45))
black_pawn = pygame.image.load('D:\python\pygame\images\\black_pawn.png')
black_pawn = pygame.transform.scale(black_pawn, (65, 65))
black_pawn_small = pygame.transform.scale(black_pawn, (45, 45))
white_queen = pygame.image.load('D:\python\pygame\images\white_queen.png')
white_queen = pygame.transform.scale(white_queen, (80, 80))
white_queen_small = pygame.transform.scale(white_queen, (45, 45))
white_king = pygame.image.load('D:\python\pygame\images\white_king.png')
white_king = pygame.transform.scale(white_king, (80, 80))
white_king_small = pygame.transform.scale(white_king, (45, 45))
white_rook = pygame.image.load('D:\python\pygame\images\white_rook.png')
white_rook = pygame.transform.scale(white_rook, (80, 80))
white_rook_small = pygame.transform.scale(white_rook, (45, 45))
white_bishop = pygame.image.load('D:\python\pygame\images\white_bishop.png')
white_bishop = pygame.transform.scale(white_bishop, (80, 80))
white_bishop_small = pygame.transform.scale(white_bishop, (45, 45))
white_knight = pygame.image.load('D:\python\pygame\images\white_knight.png')
white_knight = pygame.transform.scale(white_knight, (80, 80))
white_knight_small = pygame.transform.scale(white_knight, (45, 45))
white_pawn = pygame.image.load('D:\python\pygame\images\white_pawn.png')
white_pawn = pygame.transform.scale(white_pawn, (65, 65))
white_pawn_small = pygame.transform.scale(white_pawn, (45, 45))
for i in range(len(black_pieces)):
index = piece_list.index(black_pieces[i])
if black_pieces[i] == 'pawn':
screen.blit(
black_pawn, (black_locations[i][0] * 100 + 22, black_locations[i][1] * 100 + 30))
else:
screen.blit(black_images[index], (black_locations[i]
[0] * 100 + 10, black_locations[i][1] * 100 + 10))
if turn_step >= 2:
if selection == i:
pygame.draw.rect(screen, 'blue', [black_locations[i][0] * 100 + 1, black_locations[i][1] * 100 + 1,
100, 100], 2)
def draw_game_over():
pygame.draw.rect(screen, 'black', [200, 200, 400, 70])
screen.blit(font.render(
f'{winner} won the game!', True, 'white'), (210, 210))
screen.blit(font.render(f'Press ENTER to Restart!',
True, 'white'), (210, 240))
if winner != '':
game_over = True
draw_game_over()
pygame.display.flip()
pygame.quit()
Outputs
Chessboard
Player 1 Move :
Player 2 Move:
Conclusion
In conclusion, the development of this Python-based chess game represents more than
just the recreation of a timeless pastime in a digital format. It symbolizes the fusion of
tradition and technology, where centuries-old strategies meet cutting-edge
programming techniques. Through meticulous design and implementation, this project
has provided users with an immersive and engaging platform to explore the depths of
chess strategy, whether they are beginners or seasoned veterans.
References
• https://scholar.google.com
• https://docs.opencv.org/master/index.html
• https://www.pygame.com