Skip to content

Commit

Permalink
Engine options bug fix, getting ready for release 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
r2dev2 committed Nov 5, 2020
1 parent 6a45e6a commit 697af09
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 54 deletions.
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,20 @@ chmod +x cleartype-install-linux.bash

Keybindings:

| Key | Function |
| ---------- | ---------------- |
| ``<-`` | Move back |
| ``->`` | Move forward |
| ``f`` | Flip board |
| ``s`` | Save database |
| ``ctrl+n`` | Create game |
| ``n`` | Next game |
| ``b`` | Previous game |
| ``e`` | Toggle engine |
| ``o`` | Load a pgn |
| ``x`` | Toggle explorer |
| ``q`` | Quit application |
| Key | Function |
| ------------- | ---------------- |
| ``<-`` | Move back |
| ``->`` | Move forward |
| ``ctrl + ->`` | Variation menu |
| ``f`` | Flip board |
| ``s`` | Save database |
| ``ctrl + n`` | Create game |
| ``n`` | Next game |
| ``b`` | Previous game |
| ``e`` | Toggle engine |
| ``o`` | Load a pgn |
| ``x`` | Toggle explorer |
| ``q`` | Quit application |


## Tests
Expand All @@ -54,7 +55,7 @@ make test
- [x] Open source chess gui
- [ ] Fully-featured
- [x] Comments
- [ ] Variations
- [x] Variations
- [ ] Annotations
- [ ] Engine matches
- [x] Engine options
Expand Down
16 changes: 12 additions & 4 deletions gui.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
import io
import os
import re
import sys
Expand All @@ -8,14 +9,19 @@
from pathlib import Path
from threading import Thread, Lock

import cpuinfo
import pygame
import pygame.gfxdraw
import pygame_gui
# Pygame sends a stdout message
actual_stdout = sys.stdout
with io.StringIO() as sys.stdout:
import cpuinfo
import pygame
import pygame.gfxdraw
import pygame_gui
sys.stdout = actual_stdout

import lib
from core import Database


SQUARE_SIZE = 68
pwd = Path.home() / ".waychess"
img = pwd / "img"
Expand Down Expand Up @@ -540,6 +546,8 @@ def main():

if __name__ == "__main__":
freeze_support()
print("Welcome to WayChess. Please don't close this console!")

# Get pgn path
try:
if os.path.isfile(sys.argv[1]):
Expand Down
66 changes: 33 additions & 33 deletions installer.spec
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# -*- mode: python ; coding: utf-8 -*-

block_cipher = None


a = Analysis(['installer.py'],
pathex=['/mnt/c/Users/ronak/Documents/Workspace/WayChess'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='installer',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
upx_exclude=[],
runtime_tmpdir=None,
console=True )
# -*- mode: python ; coding: utf-8 -*-

block_cipher = None


a = Analysis(['installer.py'],
pathex=['C:\\Users\\ronak\\Documents\\Workspace\\WayChess'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='installer',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
upx_exclude=[],
runtime_tmpdir=None,
console=True )
7 changes: 4 additions & 3 deletions lib/enginelib.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,10 @@ class GUI:
def clear_analysis(self):
self.stdout("cleared")

@staticmethod
def configure_engine_options():
webbrowser.open(str(Path.home() / ".waychess" / "engineoptions.json"))
def configure_engine_options(self):
path = Path.home() / ".waychess" / "engineoptions.json"
path.touch()
self.stdout("[ENGINE CONFIGURE", webbrowser.open(str(path)))

def set_analysis(self):
self.stdout("Set engine task")
Expand Down

0 comments on commit 697af09

Please sign in to comment.