|
@@ -7,7 +7,7 @@ from connection import client_request
|
|
|
from debug import debug
|
|
|
from game import DEFAULT_ORDER_EXPIRY
|
|
|
from run_client import allowed_commands, fake_loading_bar
|
|
|
-from util import my_tabulate
|
|
|
+from util import my_tabulate, yn_dialog
|
|
|
|
|
|
exiting = False
|
|
|
|
|
@@ -196,16 +196,6 @@ def activate_key(key=''):
|
|
|
print('Key activation failed with message:', response['error_message'])
|
|
|
|
|
|
|
|
|
-def yn_dialog(msg):
|
|
|
- while True:
|
|
|
- result = input(msg + ' [y/n]: ')
|
|
|
- if result == 'y':
|
|
|
- return True
|
|
|
- if result == 'n':
|
|
|
- return False
|
|
|
- print('Type in \'y\' or \'n\'!')
|
|
|
-
|
|
|
-
|
|
|
def buy(obj_name=None, amount=None, limit='', stop_loss='', expiry=None):
|
|
|
if obj_name is None: # TODO list some available objects
|
|
|
obj_name = input('Name of object to buy: ')
|