Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions pts.py
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
player = input('Enter your player name: ')

pts = 0
print('Your available moves are: walk, study, train, points and exit')

while True:

points = input('Enter your actual action: ').lower()

if not all(part.isalpha() for part in points.split()):
print('You can just input know actions.')
action = input('Enter your actual action: ').lower().strip()

elif points == '':
if not all(part.isalpha() for part in action):
print('You can just input known actions.')

elif action == '':
print('Type something.')

elif points.strip() == 'walk':
elif action == 'walk':
pts +=1
print(f'{player} received 1 point!')
print(f'His actual score: {pts}')

elif points.strip() == 'study':
elif action == 'study':
pts +=3
print(f'{player} received 3 points!')
print(f'His actual score: {pts}')
print(f'{player} received 3 points!')

elif points.strip() == 'train':
elif action == 'train':
pts +=2
print(f'{player} received 2 points!')
print(f'His actual score: {pts}')

elif points.strip() == 'exit':
elif action == 'points':
print(f'Your score until now: {pts}')

elif action == 'exit':
print('Game finished.')
print(f'The total score of {player}: {pts}')
break
break
else:
print('Unknow command.')
print('Unknown command.')