Skip to content

Commit

Permalink
Version: 0.1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel-de-Oliveira committed Sep 22, 2021
1 parent ad97ad4 commit 53a7834
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
settingManager()
if console == 3:
timesSave.clear()
window('The cube\'s times is cleared!')
window('The cube\'s times is cleared!', 'double_line')
if console == 4:
window('Credits to:', 'double_line')
print('The creator: Samuel de Oliveira')
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ lot :wink:.
## Release notes (0.1.4.2) 🗒️

- Setting manager added;
- New modalities added;
- timer's completion more accurated;
- New modality added (4x4x4 Cube);
- Bug fixes.

---
Expand All @@ -37,7 +38,7 @@ lot :wink:.
---
## Some warnings! ⚠️

- This is the terminal version without grafical interface;
- This is the terminal version, without grafical interface;
- This program is tested only in Linux and Windows, and not in other else;
- this is a BETA version, it's not done yet;
- If you found bugs please report to fast fixing.
Expand Down
12 changes: 12 additions & 0 deletions lib/Shufflers.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,16 @@ def Lucia(size):
old = m
moves.append('B')
break
for letter in range(0, size):
x = randint(1, 3)
if moves[letter] in 'RFU':
if x == 1: moves[letter] = f'{moves[letter]}w'
if x == 2: moves[letter] = f'{moves[letter]}w2'
if x == 3: pass # do nothing "\_(シ)_/"

x = randint(1, 3)
if x == 1: moves[letter] = f'{moves[letter]}\'' # add apostrophe
if x == 2: moves[letter] = f'2{moves[letter]}' # add two
if x == 3: pass # do nothing "\_(シ)_/"

return moves
11 changes: 6 additions & 5 deletions lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def askP2():
if setting['ask+2']: setting['ask+2'] = False
else: setting['ask+2'] = True
with open('lib/setting.json', 'w+') as f: f.write(json.dumps(setting, indent=True))
window(f'ask +2 now is: {setting["ask+2"]}', 'double_line')
window(f'ask +2 now is: {setting["ask+2"]}', 'double_line')

def settingManager():
while True:
Expand All @@ -67,7 +67,7 @@ def settingManager():
break

def defModality(modality):
modals = ['3x3', '2x2', '4x4', 'pyra']
modals = ('3x3', '2x2', '4x4', 'pyra')
print('All modalities:', end='')
for m in modals: print(f' {m}', end=' ')

Expand Down Expand Up @@ -105,16 +105,17 @@ def startTimer(modality):
totalTime = time() - timer
if is_pressed('space'): break
consoleClear()
window(timeFormat(totalTime), 'double_line')
window(timeFormat(totalTime))
if is_pressed('space'): break

if setting['ask+2']:
consoleClear()
window(f'Time: {timeFormat(totalTime)}')
window(f'Time: {timeFormat(totalTime)}')
plustwo = str(input('Is this a +2? [Y/n]')).replace(' ', '')
if plustwo in 'yY': totalTime = float(totalTime) + 2

consoleClear()
window(f'Time: {timeFormat(totalTime)}', 'double_line')
window(f'Time: {timeFormat(totalTime)}', 'double_line')
timesSave.append(totalTime)
print('_-_-_-_-_-_- Times -_-_-_-_-_-_')
for n, t in enumerate(timesSave): print(f'{n+1} - {timeFormat(t)}')
Expand Down
6 changes: 0 additions & 6 deletions winConf.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
# To edit borders you need to edit settings.json file.

def line(size=40, style='basic'):
if style == 'basic': print('-' * size)
elif style == 'double_line': print('=' * size)
elif style == 'hashtag': print('#' * size)
elif style == 'zigzag': print('V' * size)
elif style == 'zagzig': print('W' * size)
else: raise NameError(f'The style \'{style}\' doesn\'t exist.')

def window(msg='[Null]', style='basic'):
line(len(msg) + 10, style)
Expand Down

0 comments on commit 53a7834

Please sign in to comment.