Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9f5cfc1

Browse files
committed
clear the screen on other platforms in text adventure game tutorial
1 parent6bc2e82 commit9f5cfc1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎general/text-adventure-game/text_adventure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737

3838
# Prompt Loop
3939
whileTrue:
40-
# Clearing the Consolewith cls
41-
os.system('cls')
40+
# Clearing the Consoleon all platforms
41+
os.system('cls'ifos.name=='nt'else'clear')
4242
# Get the current prompt all its associated data
4343
currentPrompt,currentKeys,_,action=storyPrompts[currentKey]
4444
# Finish the Adventure when the next keys list contains the string 'end'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp