Create snakegame.py#84
Create snakegame.py#84prateekiiest merged 5 commits intoprateekiiest:masterfrom salilmishra23:patch-1
Conversation
White spaces removed.
|
Do I need to pass all the checks to successfully merge my file ? |
|
yes @SPM23 |
|
fix any one issue, the others will be fixed |
|
and please follow the Pull Request Template |
Snake/snakegame.py
Outdated
| s.fill((255, 255, 255)) | ||
| xs[i]=xs[i-1];ys[i]=ys[i-1];i-= 1 | ||
| if dirs==0:ys[0]+= 20 | ||
| elif dirs==1:xs[0]+= 20 |
There was a problem hiding this comment.
write the if statements in a new line instead of one single line.
it enhances readability of code
Snake/snakegame.py
Outdated
| if xs[0] < 0 or xs[0] > 580 or ys[0] < 0 or ys[0] > 580: die(s, score) | ||
| i = len(xs)-1 | ||
| while i >= 1: | ||
| xs[i] = xs[i-1];ys[i] = ys[i-1];i -= 1 |
There was a problem hiding this comment.
do in separate lines.
This is really not a good style
Reduced parameters of function collide.
|
Cannot remove the random number generator and nested if else as because of them the game is running smoothly. What should I do now ? |
prateekiiest
left a comment
There was a problem hiding this comment.
First of all this code needs to show some output.
It doesn't do anything in the present case
|
The game works well on my Laptop. @prateekiiest |
|
I guess, it will do good if you can put the output of your code in a separate readme file under the same folder. |
|
The output of the program is this. Now tell me what should I do get it merged. |
|
you need to fix the codacy/codeclimate issues first |
|
I don't know what to use in place of random function for the food of snake. |
|
I am approving this code |
Add my snake game written in python.