Skip to content

New task/tic tac toe#22

Open
Raspberry-beans wants to merge 9 commits intomasterfrom
new_task/tic_tac_toe
Open

New task/tic tac toe#22
Raspberry-beans wants to merge 9 commits intomasterfrom
new_task/tic_tac_toe

Conversation

@Raspberry-beans
Copy link
Copy Markdown
Collaborator

No description provided.

@Raspberry-beans Raspberry-beans self-assigned this Dec 25, 2020
@Raspberry-beans Raspberry-beans linked an issue Dec 25, 2020 that may be closed by this pull request
	The game code has been upgraded with
	relevent comments and synopsis.

Relates: 23
	The variable __name__ was called in wrong
	manner. Now I have deleted the error and code
	is running fine.

Relates: 23
Copy link
Copy Markdown
Owner

@M-Shan M-Shan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check this scenario
image

@@ -0,0 +1,57 @@
"""
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please change this file name to tic_tak_toe.py and also change name of folder containing this file to tic_tac_toe

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread projects/Tic Tac Toe/Tic Tac Toe.py Outdated


def main():

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this blank line

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Function for checking the game result

:param list board: List that contains all the indices of tic tac toe game
:param string first_player_symbol and second_player_symbol: Contains player symbols defined at the start of game
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

second player param missing !

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have included the parameters for both players in one line. Please check it!

Comment thread projects/Tic Tac Toe/game_functions.py Outdated
Comment on lines +138 to +144
"""
Function for displaying the game rules

:param : None

:returns: None
"""
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please change the doc string to correct formatting as shown below:

def game_rules():
    """
    Function for displaying the game rules
    
    :param : None
    :returns:  None
    """

this comment is valid for all docstrings

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread projects/news_feed/jason.txt Outdated
@@ -0,0 +1 @@
[{"Match Number": "30th Match (N)", "Date": " Mar 15 2020", "Venue": " Karachi", " Team A": "Karachi Kings", "Team B": "Quetta Gladiators", " A score": "150/5", " B score": "154/5 ", " Result ": "Gladiators won by 5 wickets"}, {"Match Number": "29th Match", "Date": " Mar 15 2020", "Venue": " Lahore", " Team A": "Multan Sultans", "Team B": "Lahore Qalandars", " A score": "186/6", " B score": "191/1 ", " Result ": "Qalandars won by 9 wickets"}, {"Match Number": "28th Match (N)", "Date": " Mar 14 2020", "Venue": " Karachi", " Team A": "Islamabad United", "Team B": "Karachi Kings", " A score": "136/6", " B score": "137/6 ", " Result ": "Kings won by 4 wickets"}, {"Match Number": "27th Match (N)", "Date": " Mar 13 2020", "Venue": " Karachi", " Team A": "Multan Sultans", "Team B": "Peshawar Zalmi", " A score": "154/6", " B score": "151/8 ", " Result ": "Sultans won by 3 runs"}, {"Match Number": "26th Match (N)", "Date": " Mar 12 2020", "Venue": " Karachi", " Team A": "Lahore Qalandars", "Team B": "Karachi Kings", " A score": "150/5", " B score": "151/0 ", " Result ": "Kings won by 10 wickets"}, {"Match Number": "25th Match (N)", "Date": " Mar 11 2020", "Venue": " Lahore", " Team A": "Multan Sultans", "Team B": "Quetta Gladiators", " A score": "", " B score": "", " Result ": "Match abandoned without a ball bowled"}, {"Match Number": "24th Match (N)", "Date": " Mar 10 2020", "Venue": " Lahore", " Team A": "Peshawar Zalmi", "Team B": "Lahore Qalandars", " A score": "187/7", " B score": "189/5 ", " Result ": "Qalandars won by 5 wickets"}, {"Match Number": "23rd Match (N)", "Date": " Mar 8 2020", "Venue": " Lahore", " Team A": "Karachi Kings", "Team B": "Lahore Qalandars", " A score": "187/5", " B score": "190/2 ", " Result ": "Qalandars won by 8 wickets"}, {"Match Number": "22nd Match", "Date": " Mar 8 2020", "Venue": " Rawalpindi", " Team A": "Islamabad United", "Team B": "Multan Sultans", " A score": "91/7 ", " B score": "94/1 ", " Result ": "Sultans won by 9 wickets"}, {"Match Number": "21st Match (N)", "Date": " Mar 7 2020", "Venue": " Lahore", " Team A": "Quetta Gladiators", "Team B": "Lahore Qalandars", " A score": "98/9", " B score": "100/2 ", " Result ": "Qalandars won by 8 wickets"}, {"Match Number": "20th Match", "Date": " Mar 7 2020", "Venue": " Rawalpindi", " Team A": "Islamabad United", "Team B": "Peshawar Zalmi", " A score": "195/5", " B score": "85/2 ", " Result ": "Zalmi won by 7 runs (D/L)"}, {"Match Number": "19th Match (N)", "Date": " Mar 6 2020", "Venue": " Lahore", " Team A": "Multan Sultans", "Team B": "Karachi Kings", " A score": "102/6 ", " B score": "", " Result ": "No result"}, {"Match Number": "18th Match (N)", "Date": " Mar 5 2020", "Venue": " Rawalpindi", " Team A": "Peshawar Zalmi", "Team B": "Quetta Gladiators", " A score": "170/6 ", " B score": "140/7 ", " Result ": "Zalmi won by 30 runs"}, {"Match Number": "17th Match (N)", "Date": " Mar 4 2020", "Venue": " Lahore", " Team A": "Islamabad United", "Team B": "Lahore Qalandars", " A score": "198/3", " B score": "127 ", " Result ": "United won by 71 runs"}, {"Match Number": "16th Match (N)", "Date": " Mar 3 2020", "Venue": " Lahore", " Team A": "Lahore Qalandars", "Team B": "Quetta Gladiators", " A score": "209/5", " B score": "172 ", " Result ": "Qalandars won by 37 runs"}, {"Match Number": "15th Match (N)", "Date": " Mar 2 2020", "Venue": " Rawalpindi", " Team A": "Peshawar Zalmi", "Team B": "Karachi Kings", " A score": "151/8", " B score": "152/4 ", " Result ": "Kings won by 6 wickets"}, {"Match Number": "14th Match (N)", "Date": " Mar 1 2020", "Venue": " Rawalpindi", " Team A": "Islamabad United", "Team B": "Karachi Kings", " A score": "183/3", " B score": "187/5 ", " Result ": "Kings won by 5 wickets"}, {"Match Number": "13th Match (N)", "Date": " Feb 29 2020", "Venue": " Rawalpindi", " Team A": "Islamabad United", "Team B": "Peshawar Zalmi", " A score": "", " B score": "", " Result ": "Match abandoned without a ball bowled"}, {"Match Number": "12th Match", "Date": " Feb 29 2020", "Venue": " Multan", " Team A": "Multan Sultans", "Team B": "Quetta Gladiators", " A score": "199/5", " B score": "169/7 ", " Result ": "Sultans won by 30 runs"}, {"Match Number": "11th Match (N)", "Date": " Feb 28 2020", "Venue": " Rawalpindi", " Team A": "Peshawar Zalmi", "Team B": "Lahore Qalandars", " A score": "132/7 ", " B score": "116/6 ", " Result ": "Zalmi won by 16 runs"}, {"Match Number": "10th Match", "Date": " Feb 28 2020", "Venue": " Multan", " Team A": "Multan Sultans", "Team B": "Karachi Kings", " A score": "186/6", " B score": "134 ", " Result ": "Sultans won by 52 runs"}, {"Match Number": "9th Match (N)", "Date": " Feb 27 2020", "Venue": " Rawalpindi", " Team A": "Islamabad United", "Team B": "Quetta Gladiators", " A score": "187/7", " B score": "190/5 ", " Result ": "Gladiators won by 5 wickets"}, {"Match Number": "8th Match (N)", "Date": " Feb 26 2020", "Venue": " Multan", " Team A": "Peshawar Zalmi", "Team B": "Multan Sultans", " A score": "123", " B score": "124/4 ", " Result ": "Sultans won by 6 wickets"}, {"Match Number": "7th Match (N)", "Date": " Feb 23 2020", "Venue": " Lahore", " Team A": "Lahore Qalandars", "Team B": "Islamabad United", " A score": "182/6", " B score": "183/9 ", " Result ": "United won by 1 wicket"}, {"Match Number": "6th Match", "Date": " Feb 23 2020", "Venue": " Karachi", " Team A": "Karachi Kings", "Team B": "Quetta Gladiators", " A score": "156/9", " B score": "157/5 ", " Result ": "Gladiators won by 5 wickets"}, {"Match Number": "5th Match (N)", "Date": " Feb 22 2020", "Venue": " Lahore", " Team A": "Multan Sultans", "Team B": "Islamabad United", " A score": "164/8", " B score": "165/2 ", " Result ": "United won by 8 wickets"}, {"Match Number": "4th Match", "Date": " Feb 22 2020", "Venue": " Karachi", " Team A": "Quetta Gladiators", "Team B": "Peshawar Zalmi", " A score": "148/5", " B score": "153/4 ", " Result ": "Zalmi won by 6 wickets"}, {"Match Number": "3rd Match (N)", "Date": " Feb 21 2020", "Venue": " Lahore", " Team A": "Lahore Qalandars", "Team B": "Multan Sultans", " A score": "138/8", " B score": "142/5 ", " Result ": "Sultans won by 5 wickets"}, {"Match Number": "2nd Match", "Date": " Feb 21 2020", "Venue": " Karachi", " Team A": "Karachi Kings", "Team B": "Peshawar Zalmi", " A score": "201/4", " B score": "191/7 ", " Result ": "Kings won by 10 runs"}, {"Match Number": "1st Match (N)", "Date": " Feb 20 2020", "Venue": " Karachi", " Team A": "Islamabad United", "Team B": "Quetta Gladiators", " A score": "168", " B score": "171/7 ", " Result ": "Gladiators won by 3 wickets"}] No newline at end of file
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this file from PR

@Raspberry-beans
Copy link
Copy Markdown
Collaborator Author

please check this scenario
image

HI
The first error you are pointing to (in picture) has been removed
Secondly, I do not understand that why the second error (as shown in picture) happened for you. I have tried several times using different iterations, but couldn't find such error.

Raspberry-beans and others added 3 commits January 9, 2021 22:44
File deleted!
	All required changed have been addressed

relates: 22
@Raspberry-beans
Copy link
Copy Markdown
Collaborator Author

@M-Shan I have also tried to rename the file name using git mv old_filename new_filename command, but every time I got this error message
fatal: bad source, source=Tic_Tac_Toe.py, destination=tic_tac_toe.py

Kindly help!

@M-Shan
Copy link
Copy Markdown
Owner

M-Shan commented Jan 17, 2021

@M-Shan I have also tried to rename the file name using git mv old_filename new_filename command, but every time I got this error message
fatal: bad source, source=Tic_Tac_Toe.py, destination=tic_tac_toe.py

Kindly help!

just rename them on the system and do git add
image

@M-Shan
Copy link
Copy Markdown
Owner

M-Shan commented Jan 18, 2021

@Raspberry-beans no update !?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tic Tac Toe Board

3 participants