Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleared user input for multiple functions using cls #128

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .idea/.gitignore
Copy link
Collaborator

Choose a reason for hiding this comment

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

do not include your .idea folder as part of the git push.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .idea/TERMINALMONOPOLY.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion modules.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import screenspace as ss
from screenspace import Terminal
import style as s
Expand All @@ -24,7 +25,7 @@ def calculator_terminal_response(footer_option: int) -> str:
for i in range(len(calculator_history_queue)-1, -1, -1):
response += calculator_history_queue[i][0]
response += '\n' + footer_options[footer_option]

os.system('cls')
return response

#Helper function to update calculator history
Expand Down Expand Up @@ -146,6 +147,7 @@ def list_properties() -> str:
color = getattr(s.COLORS, first_word.upper(), s.COLORS.RESET)
centered_prop = prop.center(75)
ret_val +=color+ centered_prop + s.COLORS.RESET + '\n'
os.system('cls')
return ret_val

def ttt_handler(server: Socket, active_terminal: Terminal, player_id: int) -> None:
Expand Down Expand Up @@ -247,6 +249,7 @@ def fishing(gamestate: str) -> tuple[str, str]:
"""
stdIn = ''
if (gamestate == 'start'):
os.system('cls')
return fishing_game_obj.start(), 'playing'
elif (gamestate == 'playing'):
stdIn = fishing_game_obj.get_input()
Expand Down
2 changes: 2 additions & 0 deletions player.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,10 @@ def get_input() -> None:
skip_initial_input = True
continue
if stdIn == "helpstocks" or stdIn == "help stocks":
os.system('cls')
active_terminal.update(g.get("helpstocks"), padding=False)
elif stdIn.startswith("help"):
os.system('cls')
if (len(stdIn) == 6 and stdIn[5].isdigit() and 2 >= int(stdIn.split(" ")[1]) > 0):
active_terminal.update(g.get(stdIn if stdIn != 'help 1' else 'help'), padding=True)
else:
Expand Down