rishibaghel25 / 2DChampion

Welcome to the 2DChampion Game Development Repository! This is a public repository where developers can contribute to the development of 2D games that will be featured on the 2DChampion website.
GNU General Public License v3.0
4 stars 10 forks source link

Issue in Pixel Python Game #18

Open rishibaghel25 opened 1 year ago

rishibaghel25 commented 1 year ago

In pixel python game the length of snake is not increasing

SimardeepSingh-zsh commented 1 year ago

/ Corrected typo / / Find errors in this code /

.container { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; / Use min-height instead of height / }

.game-area { position: relative; width: 500px; height: 500px; background-color: #333; overflow: hidden; margin-bottom: 20px; border: 2px solid #000; }

.snake, .food { position: absolute; width: 10px; height: 10px; }

.snake { background-color: #fff; z-index: 1; }

.food { background-color: #f00; z-index: 2; }

.score { font-size: 18px; font-weight: bold; text-align: center; margin-bottom: 10px; }

/ Improved button styles with :hover and :focus states / .start-button, .restart-button, .high-score, .close-button { display: block; margin: 0 auto; padding: 10px 20px; font-size: 16px; font-weight: bold; background-color: #4caf50; color: #fff; border: none; cursor: pointer; margin-bottom: 10px; text-align: center; text-decoration: none; / Reset default link styles / }

.start-button:hover, .restart-button:hover, .high-score:hover, .close-button:hover, .start-button:focus, .restart-button:focus, .high-score:focus, .close-button:focus { background-color: #45a049; / Darker color on hover/focus / }

.restart-button { background-color: #f44336; }

.restart-button:hover, .restart-button:focus { background-color: #d32f2f; / Darker color on hover/focus / }

rishibaghel25 commented 1 year ago

you can raise PR . this time i replaced your provided css with existing css of pixel python. the issue is length of snake is not increasing