Compare commits

..

31 Commits

Author SHA1 Message Date
vargadavidlajos
6c2c9aeb10 added points 7-15 to rendszerterv.md 2025-11-15 20:19:35 +01:00
Bence
0dae3f9773 Rendszerterv első része az órán közösen megbeszéltek alapján 2025-11-12 11:20:54 +01:00
8f9a48fa96 rendszerterv v1 2025-11-11 12:40:29 +01:00
Hatvani Tamás
85f7c6e690 Remove checkout step from upload_data workflow
Removed checkout step from upload job in workflow.
2025-11-09 15:05:10 +01:00
Hatvani Tamás
2ac2f17d1a Fix subprocess by adding decode to file path in upload_data.yml 2025-11-09 15:01:42 +01:00
Hatvani Tamás
7cd4bb6b09 Refactor subprocess call and print statement
Updated subprocess command to use list format and modified print statement for clarity.
2025-11-09 14:55:23 +01:00
1bf4d875af Workflow: added subprocess run to have the correct path for the test log file 2025-11-09 14:48:04 +01:00
Hatvani Tamás
8a01bba644 Update pip install command to break system packages 2025-11-09 14:34:18 +01:00
Hatvani Tamás
cf2edab297 Remove Python setup from upload_data workflow
Removed Python setup step for Google Sheets API.
2025-11-09 14:31:18 +01:00
Hatvani Tamás
5443002c5f Workflow: removed runs-on: self-hosted from test upload job 2025-11-09 14:26:28 +01:00
e19a5aac9a Workflow: Re added test-upload job, added workflow_call trigger 2025-11-09 14:24:24 +01:00
Hatvani Tamás
3515703a90 Modify zip commands in release workflow to include files in the folder with the wildcard
Update zip commands to include all files in the directories.
2025-11-09 13:12:27 +01:00
Hatvani Tamás
a6966e055d Compress build folders for upload
Added compression step for build folders before release.
2025-11-09 13:05:23 +01:00
Hatvani Tamás
e41be61321 Modify release files to target linux and windows
Update release workflow to include specific OS directories.
2025-11-09 12:55:14 +01:00
1b4194ee7d Cleanup job depend on release, added missing .cargo folder to fix cc error on workflow build 2025-11-09 12:44:33 +01:00
Hatvani Tamás
4763cbed95 Update dispatcher.yml to include permissions
Add permissions for write access to contents
2025-11-09 12:36:33 +01:00
Hatvani Tamás
9253283953 Workflow: re enabled test-data-upload with temp commands 2025-11-09 12:34:45 +01:00
596828e827 Added release workflow, started work on the upload to spreadsheet 2025-11-09 12:29:46 +01:00
Hatvani Tamás
c6c2e27d34 Add cleanup job to dispatcher workflow
Add a cleanup job to the workflow for final cleanup.
2025-11-07 13:19:40 +01:00
bc2eca7eac added new test.sh script
The test.sh script will run the cargo test and save a formatted output
from each project and then append them to a final log file which will be
the data to be uploaded to the spreadsheet
2025-11-07 12:54:11 +01:00
86ceab10ad Workflow: removed rust setup from the tests, as it is installed on device 2025-11-05 15:27:47 +01:00
785e40f538 Workflow: removed branch from tests call 2025-11-05 15:24:35 +01:00
39da1be9de Workflow: added new triggers for running test workflows 2025-11-05 15:08:33 +01:00
Hatvani Tamás
7ef9855016 Update workflow paths and conditions in dispatcher.yml 2025-11-05 15:00:42 +01:00
Hatvani Tamás
b5902c0bb7 Merge pull request #2 from htamas1210/Workflow
Workflow: dispatching workflow with 'uses'
2025-11-05 14:58:42 +01:00
76a1c18b56 Workflow: dispatching workflow with 'uses' 2025-11-05 14:58:08 +01:00
Hatvani Tamás
27394df920 Merge pull request #1 from htamas1210/Workflow
Workflow: Trying workflow on master branch
2025-11-05 14:49:08 +01:00
3df33093ed Workflow: Added the workflow files, changed ls to pwd in tests 2025-11-05 14:47:50 +01:00
300b3cde34 Workflow: Triggering the workflow a different way with gh script 2025-11-05 13:46:29 +01:00
a19e0bf922 Workflow: added missing repository checkout
Repository checkout was missing from the dispatch workflow
2025-11-05 13:30:58 +01:00
7625eecbd9 Workflow: Dispatch and Test runner workflow test #1
Testing the dispatcher and engine_test workflow for any bugs, the
changes on these files always need to be uploaded to github to test if
it is working correctly
2025-11-05 13:26:23 +01:00
14 changed files with 865 additions and 0 deletions

95
.github/workflows/dispatcher.yml vendored Normal file
View File

@@ -0,0 +1,95 @@
name: Dispatcher
on:
push:
branches:
- '**'
permissions:
contents: write
jobs:
dispatch:
runs-on: self-hosted
outputs:
engine: ${{ steps.check.outputs.engine }}
server: ${{ steps.check.outputs.server }}
ui: ${{ steps.check.outputs.ui }}
steps:
- name: Determine which tests to run
id: check
run: |
BRANCH="${{ github.ref_name }}"
echo "Branch: $BRANCH"
ENGINE=false
SERVER=false
UI=false
if [[ "$BRANCH" == *"Engine"* ]]; then
ENGINE=true
fi
if [[ "$BRANCH" == *"Server"* ]]; then
SERVER=true
fi
if [[ "$BRANCH" == *"UI"* ]]; then
UI=true
fi
# Run all on master
if [[ "$BRANCH" == "master" ]]; then
ENGINE=true
SERVER=true
UI=true
fi
echo "engine=$ENGINE" >> $GITHUB_OUTPUT
echo "server=$SERVER" >> $GITHUB_OUTPUT
echo "ui=$UI" >> $GITHUB_OUTPUT
engine:
needs: dispatch
if: needs.dispatch.outputs.engine == 'true'
uses: ./.github/workflows/engine_test.yml
secrets: inherit
server:
needs: dispatch
if: needs.dispatch.outputs.server == 'true'
uses: ./.github/workflows/server_test.yml
secrets: inherit
ui:
needs: dispatch
if: needs.dispatch.outputs.ui == 'true'
uses: ./.github/workflows/ui_test.yml
secrets: inherit
test-data-upload:
needs: [engine, server, ui]
if: always()
uses: ./.github/workflows/upload_data.yml
secrets: inherit
release:
needs: test-data-upload
if: github.ref == 'refs/heads/master'
uses: ./.github/workflows/release.yml
secrets: inherit
cleanup:
runs-on: self-hosted
needs: [engine, server, ui, test-data-upload, release]
if: always()
steps:
- name: Final cleanup
run: |
echo "Final cleanup on self-hosted runner..."
cd "$GITHUB_WORKSPACE"
git clean -fdx
git reset --hard

17
.github/workflows/engine_test.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: Engine Tests
on:
pull_request:
workflow_dispatch:
workflow_call:
jobs:
engine-tests:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Run Engine tests
run: |
bash .github/workflows/test.sh engine/

106
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,106 @@
name: Release build
on:
pull_request:
workflow_dispatch:
workflow_call:
permissions:
contents: write
jobs:
release:
name: Build and release (master only)
runs-on: self-hosted
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Engine for Linux
run: |
cd $(git rev-parse --show-toplevel)
pwd
mkdir release/linux -p
cd engine/
rustup target add x86_64-unknown-linux-gnu
cargo build --release --target x86_64-unknown-linux-gnu
pwd
cp target/x86_64-unknown-linux-gnu/release/engine $(git rev-parse --show-toplevel)/release/linux/engine
- name: Build Server for Linux
run: |
cd $(git rev-parse --show-toplevel)
pwd
mkdir release/linux -p
cd server/
rustup target add x86_64-unknown-linux-gnu
cargo build --release --target x86_64-unknown-linux-gnu
pwd
cp target/x86_64-unknown-linux-gnu/release/server $(git rev-parse --show-toplevel)/release/linux/server
- name: Build UI for Linux
run: |
cd $(git rev-parse --show-toplevel)
pwd
mkdir release/linux -p
cd ui/
rustup target add x86_64-unknown-linux-gnu
cargo build --release --target x86_64-unknown-linux-gnu
pwd
cp target/x86_64-unknown-linux-gnu/release/ui $(git rev-parse --show-toplevel)/release/linux/ui
- name: Build Engine for Windows
run: |
cd $(git rev-parse --show-toplevel)
pwd
mkdir release/windows -p
cd engine/
rustup target add x86_64-pc-windows-gnu
cargo build --release --target x86_64-pc-windows-gnu
pwd
cp target/x86_64-pc-windows-gnu/release/engine.exe $(git rev-parse --show-toplevel)/release/windows/engine.exe
- name: Build Server for Windows
run: |
cd $(git rev-parse --show-toplevel)
pwd
mkdir release/windows -p
cd server/
rustup target add x86_64-pc-windows-gnu
cargo build --release --target x86_64-pc-windows-gnu
pwd
cp target/x86_64-pc-windows-gnu/release/server.exe $(git rev-parse --show-toplevel)/release/windows/server.exe
- name: Build UI for Windows
run: |
cd $(git rev-parse --show-toplevel)
pwd
mkdir release/windows -p
cd ui/
rustup target add x86_64-pc-windows-gnu
cargo build --release --target x86_64-pc-windows-gnu
pwd
cp target/x86_64-pc-windows-gnu/release/ui.exe $(git rev-parse --show-toplevel)/release/windows/ui.exe
- name: Compress build folders for upload
run: |
cd $(git rev-parse --show-toplevel)
pwd
cd release/
zip linux.zip linux/*
zip windows.zip windows/*
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{ github.run_number }}"
name: "Release v${{ github.run_number }}"
generate_release_notes: true
files: |
release/linux.zip
release/windows.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

17
.github/workflows/server_test.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: Server Tests
on:
pull_request:
workflow_dispatch:
workflow_call:
jobs:
server-tests:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Run Server tests
run: |
bash .github/workflows/test.sh server/

37
.github/workflows/test.sh vendored Executable file
View File

@@ -0,0 +1,37 @@
#!/usr/bin/env bash
set -e
# --- ARGUMENT CHECK ---
if [ -z "$1" ]; then
echo "Usage: $0 <project_path>"
exit 1
fi
# --- SETUP VARIABLES ---
PROJECT_PATH="$1"
PROJECT_NAME=$(basename "$PROJECT_PATH")
ROOT_DIR=$(git rev-parse --show-toplevel)
LOG_FILE="${PROJECT_NAME}_test.log"
FINAL_LOG="${ROOT_DIR}/test_data.log"
# --- MOVE TO PROJECT DIRECTORY ---
echo ">>> Running tests for project: $PROJECT_NAME"
cd "$PROJECT_PATH" || { echo "Error: Could not cd into $PROJECT_PATH"; exit 1; }
# --- RUN TESTS ---
cargo test --verbose | tee full_test_output.log
# --- EXTRACT TEST SECTION ---
# Create the log file with the project name as the first line
echo "$PROJECT_NAME" > "$LOG_FILE"
# Then append only the lines between "running X test(s)" and the first empty line
awk '/^running [0-9]+ test[s]?$/,/^$/' full_test_output.log >> "$LOG_FILE"
# --- APPEND TO GLOBAL LOG (in repo root) ---
cat "$LOG_FILE" >> "$FINAL_LOG"
# --- SUMMARY ---
echo ">>> Test output extracted to $PROJECT_PATH/$LOG_FILE"
echo ">>> Appended to $FINAL_LOG"

17
.github/workflows/ui_test.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: UI Tests
on:
pull_request:
workflow_dispatch:
workflow_call:
jobs:
ui-tests:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Run UI tests
run: |
bash .github/workflows/test.sh ui/

52
.github/workflows/upload_data.yml vendored Normal file
View File

@@ -0,0 +1,52 @@
name: Upload Test Results to Google Sheets
on:
workflow_dispatch:
workflow_call:
jobs:
upload:
runs-on: self-hosted
steps:
- name: Install dependencies
run: |
pip install gspread google-auth --break-system-packages
- name: Upload test_data.log to Google Sheets
env:
GOOGLE_SERVICE_ACCOUNT_JSON: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_JSON }}
SPREADSHEET_ID: ${{ secrets.SPREADSHEET_ID }}
run: |
echo "$GOOGLE_SERVICE_ACCOUNT_JSON" > service_account.json
python <<'PYCODE'
import gspread, json, time, subprocess
# credentials
creds = json.load(open("service_account.json"))
gc = gspread.service_account_from_dict(creds)
sh = gc.open_by_key("${{ secrets.SPREADSHEET_ID }}")
v = subprocess.run(['git','rev-parse','--show-toplevel'], capture_output=True).stdout.decode().strip()
print(f"{v}/test_data.log")
with open(f"{v}/test_data.log", "r") as f:
lines = [line.strip() for line in f if line.strip()]
project = lines[0].lower()
worksheet = sh.worksheet(project)
# project name
data = lines[1:]
#blank rows
existing_rows = len(worksheet.get_all_values())
start_row = existing_rows + 3
# Split data into columns (by spaces)
rows_to_append = [row.split() for row in data]
for i, row in enumerate(rows_to_append):
worksheet.insert_row(row, start_row + i)
print(f"Uploaded {len(rows_to_append)} rows to '{project}' tab.")
PYCODE

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 KiB

View File

@@ -0,0 +1,287 @@
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (X11; Linux x86_64; rv:144.0) Gecko/20100101 Firefox/144.0" version="28.2.9">
<diagram name="Page-1" id="9d-IwT1pk2NoWoP7MTJv">
<mxGraphModel dx="1534" dy="751" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="9999" pageHeight="9999" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-10" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="IaA3IaIvg4qVMEhu7ya9-1" target="IaA3IaIvg4qVMEhu7ya9-36" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-1" value="App megnyitása" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="120" y="50" width="140" height="40" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-10" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="IaA3IaIvg4qVMEhu7ya9-6" target="IaA3IaIvg4qVMEhu7ya9-9" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="540" y="120" />
<mxPoint x="370" y="120" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-12" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="IaA3IaIvg4qVMEhu7ya9-6" target="IaA3IaIvg4qVMEhu7ya9-11" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-13" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="IaA3IaIvg4qVMEhu7ya9-6" target="IaA3IaIvg4qVMEhu7ya9-11" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-14" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="IaA3IaIvg4qVMEhu7ya9-6" target="IaA3IaIvg4qVMEhu7ya9-11" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-15" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="IaA3IaIvg4qVMEhu7ya9-6" target="IaA3IaIvg4qVMEhu7ya9-11" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="IaA3IaIvg4qVMEhu7ya9-6" target="IaA3IaIvg4qVMEhu7ya9-18" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="670" y="180" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-21" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="IaA3IaIvg4qVMEhu7ya9-6" target="IaA3IaIvg4qVMEhu7ya9-20" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-6" value="&lt;div&gt;főmenü&lt;/div&gt;" style="whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="480" y="40" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-24" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="IaA3IaIvg4qVMEhu7ya9-9" target="IaA3IaIvg4qVMEhu7ya9-23" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-9" value="Lokális játék hosztolása" style="whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="310" y="210" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-32" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="IaA3IaIvg4qVMEhu7ya9-11" target="IaA3IaIvg4qVMEhu7ya9-31" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-11" value="&lt;div&gt;Lokális játékba csatlakozni&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;" style="whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="460" y="220" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-13" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="IaA3IaIvg4qVMEhu7ya9-18" target="4rzJeeoM2DMZDjvMm2AJ-12" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-18" value="Online jatek&lt;br&gt;(sorba allas)" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="695" y="200" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-22" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0;exitDx=0;exitDy=0;entryX=1;entryY=0;entryDx=0;entryDy=0;" parent="1" source="IaA3IaIvg4qVMEhu7ya9-20" target="IaA3IaIvg4qVMEhu7ya9-6" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-28" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="IaA3IaIvg4qVMEhu7ya9-20" target="IaA3IaIvg4qVMEhu7ya9-27" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-3" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="IaA3IaIvg4qVMEhu7ya9-20" target="IaA3IaIvg4qVMEhu7ya9-27">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="IaA3IaIvg4qVMEhu7ya9-20" target="iJwoCWMJ6fIoSaqHo3aH-4">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-6" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="IaA3IaIvg4qVMEhu7ya9-20" target="iJwoCWMJ6fIoSaqHo3aH-4">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="IaA3IaIvg4qVMEhu7ya9-20" target="iJwoCWMJ6fIoSaqHo3aH-7">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="770" y="80" />
<mxPoint x="1000" y="80" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-10" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="IaA3IaIvg4qVMEhu7ya9-20" target="iJwoCWMJ6fIoSaqHo3aH-9">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-20" value="&lt;div&gt;Beallitasok&lt;/div&gt;" style="whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="650" y="40" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="IaA3IaIvg4qVMEhu7ya9-23" target="4rzJeeoM2DMZDjvMm2AJ-4" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-23" value="&lt;div&gt;Szerver peldany elinditasa&lt;/div&gt;" style="whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="130" y="150" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-31" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="IaA3IaIvg4qVMEhu7ya9-25" target="IaA3IaIvg4qVMEhu7ya9-29" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-16" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="IaA3IaIvg4qVMEhu7ya9-25" target="iJwoCWMJ6fIoSaqHo3aH-15">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-25" value="varakozas az ellenfelre" style="whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="130" y="390" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-27" value="lokalis jatekhoz port megvaltoztatasa" style="whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="830" y="10" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-33" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="IaA3IaIvg4qVMEhu7ya9-29" target="4rzJeeoM2DMZDjvMm2AJ-32" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-29" value="&lt;div&gt;jatek elkezdése&lt;/div&gt;" style="whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="400" y="850" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-34" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="IaA3IaIvg4qVMEhu7ya9-31" target="IaA3IaIvg4qVMEhu7ya9-33" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-31" value="&lt;div&gt;lokalis halozaton szerver ip:port megadasa&lt;/div&gt;" style="whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="460" y="360" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="IaA3IaIvg4qVMEhu7ya9-33" target="IaA3IaIvg4qVMEhu7ya9-29" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-33" value="csatlakozás" style="whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="290" y="360" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-38" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="IaA3IaIvg4qVMEhu7ya9-36" target="IaA3IaIvg4qVMEhu7ya9-6" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="IaA3IaIvg4qVMEhu7ya9-36" value="user struct letrehozasa a app-ban" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="340" y="40" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="4rzJeeoM2DMZDjvMm2AJ-4" target="4rzJeeoM2DMZDjvMm2AJ-7" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-4" value="hostolo kapcsolodik a szerverehez" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="130" y="230" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="4rzJeeoM2DMZDjvMm2AJ-7" target="IaA3IaIvg4qVMEhu7ya9-25" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-7" value="eszköz ip cím lekérése a csatlakozáshoz" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="130" y="310" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-21" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="4rzJeeoM2DMZDjvMm2AJ-12" target="4rzJeeoM2DMZDjvMm2AJ-20" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-12" value="&lt;div&gt;csatlakozás a központi szerverhez&lt;/div&gt;(tudjuk az ip cimet)" style="whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="690" y="300" width="130" height="70" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-24" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="4rzJeeoM2DMZDjvMm2AJ-16" target="4rzJeeoM2DMZDjvMm2AJ-23" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-27" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="4rzJeeoM2DMZDjvMm2AJ-16" target="4rzJeeoM2DMZDjvMm2AJ-26" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-16" value="sorban állás szabad játékra várva" style="whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="695" y="480" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-22" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="4rzJeeoM2DMZDjvMm2AJ-20" target="4rzJeeoM2DMZDjvMm2AJ-16" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-20" value="a szerver eltárolja az uj jatekost mint aktiv felhasznalo a listaban" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="700" y="390" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-23" value="a szerveren bekerultunk a varolistaba" style="ellipse;whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="850" y="465" width="155" height="90" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-29" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="4rzJeeoM2DMZDjvMm2AJ-26" target="4rzJeeoM2DMZDjvMm2AJ-28" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-26" value="&lt;div&gt;megjelent meg egy jatekos a varolistan&lt;/div&gt;" style="whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="695" y="570" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-30" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="4rzJeeoM2DMZDjvMm2AJ-28" target="IaA3IaIvg4qVMEhu7ya9-29" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-28" value="ket jatekos ossze vonasa egy meccsbe. Kivesszuk oket a varolistabol es egy Match structba osszevonjuk oket" style="whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="682.5" y="660" width="145" height="120" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-35" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="4rzJeeoM2DMZDjvMm2AJ-32" target="4rzJeeoM2DMZDjvMm2AJ-34" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-32" value="&lt;div&gt;fehér és fekete oldal eldöntése&lt;/div&gt;&lt;div&gt;(szerver által, érme dobással)&lt;/div&gt;" style="whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="390" y="950" width="140" height="80" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-37" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="4rzJeeoM2DMZDjvMm2AJ-34" target="4rzJeeoM2DMZDjvMm2AJ-36" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-34" value="játék ui megjelenítése" style="whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="400" y="1060" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-39" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="4rzJeeoM2DMZDjvMm2AJ-36" target="4rzJeeoM2DMZDjvMm2AJ-38" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-36" value="lehetséges lépések lekérése a tábla állapot alapján a szerver / engine-től" style="whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="390" y="1160" width="140" height="90" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-41" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="4rzJeeoM2DMZDjvMm2AJ-38" target="4rzJeeoM2DMZDjvMm2AJ-40" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-38" value="a ui lokalisan eltarolja ezt az adot a következő körig" style="whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="400" y="1280" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-2" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="4rzJeeoM2DMZDjvMm2AJ-40" target="iJwoCWMJ6fIoSaqHo3aH-1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-19" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="4rzJeeoM2DMZDjvMm2AJ-40" target="iJwoCWMJ6fIoSaqHo3aH-18">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4rzJeeoM2DMZDjvMm2AJ-40" value="a jatekos lep a egy babual. Ekkor ellenorizzuk hogy szabad e volt ezt a léppést megtennie" style="whiteSpace=wrap;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="390" y="1370" width="140" height="90" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-12" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="iJwoCWMJ6fIoSaqHo3aH-1" target="iJwoCWMJ6fIoSaqHo3aH-11">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-14" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="iJwoCWMJ6fIoSaqHo3aH-1" target="iJwoCWMJ6fIoSaqHo3aH-13">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-1" value="ha szabad volt elküldjük a lépést a szervernek" style="whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="1">
<mxGeometry x="400" y="1490" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-4" value="felbontás megváltoztatása" style="whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="1">
<mxGeometry x="830" y="90" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-7" value="teljes képernyő" style="whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="1">
<mxGeometry x="1000" y="50" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-9" value="ai api kulcs megadása" style="whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="1">
<mxGeometry x="1000" y="140" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-21" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="iJwoCWMJ6fIoSaqHo3aH-11" target="iJwoCWMJ6fIoSaqHo3aH-20">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-11" value="&lt;div&gt;ellenfél ui frissítése&lt;/div&gt;" style="whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="1">
<mxGeometry x="400" y="1580" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-13" value="&lt;div&gt;{&lt;/div&gt;&lt;div&gt;from:str,&lt;/div&gt;&lt;div&gt;to: str&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;" style="rhombus;whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="1">
<mxGeometry x="560" y="1455" width="140" height="130" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-15" value="Ip cím megjelenítése a könnyebb csatlakozás érdekében" style="ellipse;whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="1">
<mxGeometry x="20" y="490" width="120" height="150" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-18" value="a ui végig megy az adatokon, amit visszakapott a szervertől a kör elején" style="ellipse;whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="1">
<mxGeometry x="590" y="1290" width="170" height="110" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-23" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="iJwoCWMJ6fIoSaqHo3aH-20" target="iJwoCWMJ6fIoSaqHo3aH-22">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-25" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="iJwoCWMJ6fIoSaqHo3aH-20" target="iJwoCWMJ6fIoSaqHo3aH-24">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-27" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="iJwoCWMJ6fIoSaqHo3aH-20">
<mxGeometry relative="1" as="geometry">
<mxPoint x="640" y="1860" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-20" value="ellenőrizzük, hogy nyert-e a játékos vagy döntetlen lett-e" style="whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="1">
<mxGeometry x="395" y="1670" width="130" height="70" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-22" value="a szerver megkapja a tábla állást és elküldi az enginnek ami ad egy választ" style="ellipse;whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="1">
<mxGeometry x="560" y="1647.5" width="200" height="115" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="iJwoCWMJ6fIoSaqHo3aH-24" target="4rzJeeoM2DMZDjvMm2AJ-36">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="360" y="1820" />
<mxPoint x="360" y="1205" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-24" value="kör átadása az ellenfélnek" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="400" y="1790" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-30" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="iJwoCWMJ6fIoSaqHo3aH-28" target="iJwoCWMJ6fIoSaqHo3aH-29">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-28" value="játék befejezése, nyertes megjelnítése,&amp;nbsp;" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="580" y="1860" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="iJwoCWMJ6fIoSaqHo3aH-29" value="a játékosokat vissza küldjük a menübe, a szerver oldalon töröljük a meccset a listából, és töröljük&amp;nbsp; a játékosokat a meccs közben lévő listából" style="whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="1">
<mxGeometry x="560" y="1940" width="160" height="120" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

225
Docs/rendszerterv.md Normal file
View File

@@ -0,0 +1,225 @@
# Knightly — Rendszerterv (végleges architektúra)
Ez a dokumentum a *Knightly* sakkprojekt végleges rendszertervét írja le. A terv a korábban megosztott draw.io diagramon alapul, és fejlesztésre kész, technikai + működési leírást egyaránt tartalmaz.
---
## Tartalom
1. Összefoglaló célok
2. Fő komponensek és szerepek
3. Kommunikációs modell (WebSocket)
4. Üzenetsémák (JSON) — szabványosított formátumok
5. Matchmaking és meccskezelés
6. Játékfolyamat (lifecycle)
7. Engine integráció és validáció
8. UIServerEngine adatáramlás
9. Hálózat, üzemeltetés és deployment
10. Biztonság és jogosultságok
11. Naplózás, hibakezelés és monitoring
12. Tesztelés és CI/CD integráció
13. Üzemeltetési kézikönyv (runbook)
14. Fejlesztési roadmap és ajánlott következő lépések
15. Mellékletek — fontos konfigurációk, environment változók
---
## 1. Összefoglaló célok
- Kisméretű, LAN-on vagy interneten keresztül futtatható sakk-szerver tervezése.
- Stabil WebSocket alapú kommunikáció a UI (Rust) és a Server (Rust) között.
- Egyszerű, megbízható matchmaking (sorbaállás) és 1v1 meccskezelés.
- A szerver felel a meccsek létrehozásáért, a játék állapotáért és az engine-nek továbbított validálásért.
- A rendszer skálázható alapokra épül, később központi (cloud) hosztolásra bővíthető.
---
## 2. Fő komponensek és szerepek
### 2.1 UI (Client)
- Nyelv: Rust (egységes platform). Desktop UI (pl. egui/Tauri/SDL stb.).
- Feladatai: felhasználói interakció, önálló render, locale input, kliens-oldali lépésellenőrzés előzetes vizsgálata, WebSocket kapcsolat kezelése.
- Kommunikáció: WebSocket (ws:// vagy wss://) a szerverrel.
### 2.2 Server
- Nyelv: Rust, aszinkron (`tokio`), WebSocket támogatás (`tokio-tungstenite` vagy `axum`+`tokio-tungstenite`).
- Feladatai: kapcsolatok kezelése, matchmaking, meccsek életciklusa, üzenetek továbbítása, engine-hez való kommunikáció a lépések ellenőrzésére és szerepeltetésére.
- Állapot: memória alapú strukturák (`players`, `waiting_queue`, `matches`), opcionális perzisztencia (logok, ranglista) később.
### 2.3 Engine
- Feladat: sakk-szabályok végrehajtása, lépések validálása, legális lépések listázása, opció: AI játékos.
- Integrációs lehetőségek:
- könyvtárként (Rust crate) közvetlenül a szerveren belül, vagy
- külön folyamatként (stdin/stdout) vagy helyi RPC (Unix socket), illetve
- távoli szolgáltatás (gRPC/HTTP) később.
---
## 3. Kommunikációs modell (WebSocket)
- Egy porton fut a WS szerver (pl. `0.0.0.0:8080`). Nem szükséges több port.
- Minden kliens egyedi WebSocket kapcsolatot nyit. A szerver minden kapcsolatot azonosít (UUID vagy generált client id).
- A szerver tartja a `tx` (küldő) csatornát minden csatlakozott játékoshoz, így onnan tud üzenetet küldeni.
- Az üzenetek JSON formátumban érkeznek és mennek (text frames). Binary nem szükséges a kezdetekkor.
**Kapcsolódási lépések:**
1. UI csatlakozik → `Join` üzenet (felhasználónév).
2. Szerver visszaad `Welcome` (player id) vagy `Error`.
3. Keresés vagy hosting esetén a UI küld `FindMatch` vagy `HostLocal` parancsot.
4. Szerver párosít és `MatchFound` üzenetet küld mindkét félnek, tartalmazza az ellenfél metaadatait és ki kezd.
---
## 4. Üzenetsémák (JSON)
Az alábbiak a tervezett, szabványosított JSON üzenettípusok. Nem pszeudokód — egyszerű, pontos séma.
### 4.1 **Client -> Server**
- `Join`
```json
{ "type": "join", "username": "Alice" }
```
- `FindMatch` (sorbaállás)
```json
{ "type": "find_match", "mode": "1v1" }
```
- `HostLocal` (ha a kliens hostolni akarja a lokális meccset)
```json
{ "type": "host_local", "port": 9001 }
```
- `Move` (lépés beküldése)
```json
{ "type": "move", "from": "e2", "to": "e4", "promotion": null }
```
- `RequestLegalMoves`
```json
{ "type": "legal_moves", "fen": "..." }
```
- `Resign` / `OfferDraw` / `Chat` — hasonló egyszerű objektumok.
### 4.2 **Server -> Client**
- `Welcome`
```json
{ "type": "welcome", "player_id": "<uuid>" }
```
- `MatchFound`
```json
{ "type": "match_found", "match_id": "<uuid>", "opponent": {"id":"...","name":"Bob"}, "color": "white" }
```
- `OpponentMove`
```json
{ "type": "opponent_move", "from": "e2", "to": "e4", "promotion": null }
```
- `MoveResult` (valid/invalid, updated FEN, clocks)
```json
{ "type": "move_result", "valid": true, "fen": "...", "turn": "black" }
```
- `LegalMovesResponse`
```json
{ "type": "legal_moves", "moves": ["e2e4","d2d4"] }
```
- `Error` / `Info` / `GameEnd`
---
## 5. Matchmaking és meccskezelés
- **Várólista (FIFO):** a `waiting_queue` (`VecDeque<Uuid>`) tartja a *FindMatch*-előket.
- **Automatikus párosítás:** ha legalább két játékos van a várólistában, a szerver párba állítja őket és létrehoz egy `Match` struct-ot.
- **Match struct tartalma:** `match_id`, `white_id`, `black_id`, `fen` (kezdőállás), `move_history`, `clocks`.
- **Szereposztás:** véletlenszerű (érme dobás szerű) döntés vagy rang alapján.
- **Állapotkezelés:** a szerver az egyetlen egységes állapotgazda; minden új lépés a szerveren kerül ellenőrzésre és csak ha valid, akkor broadcastolásra.
**Különleges esetek:**
- Ha egyik fél kilép a meccs közben → szerver értesíti az ellenfelet, meccs státusza `aborted` vagy `win_by_disconnect`.
- Reconnect: ha a kliens újracsatlakozik, a szerver match-id alapján visszaállíthatja a játékot (ha ezt implementáljuk).
---
## 6. Játékfolyamat (lifecycle)
1. **Csatlakozás:** client küld `join`, szerver visszaad `welcome`.
2. **Keresés vagy hostolás:** client küld `find_match` vagy `host_local`.
3. **Párosítás:** szerver párosít, küld `match_found` mindkét félnek.
4. **Kezdés:** szerver küld kezdő FEN-t és azt, ki a fehér.
5. **Lépés küldése:** player A küld `move` üzenetet.
6. **Validálás:** szerver lekéri a félellenőrzést az engine-től (vagy saját szabályellenőrzés), ha valid → update `fen`, append `move_history`, küld `move_result` és `opponent_move` a másik félnek.
7. **Végállapot:** ha matt/döntetlen/timeout → szerver `game_end` és törli match-t, kerül a statisztikákba.
8. **Utak a menübe:** a játékosokat visszairányítjuk a főmenübe, match eltávolítva.
---
## 7. Engine integráció és validáció
- **Ajánlott integráció:** a chess engine legyen Rust crate, amelyet a szerver hív pontos függvényekkel — így egyszerű és gyors. Ha nem lehetséges, használjunk helyi folyamatot (`stdin/stdout`), vagy IPC (Unix domain socket).
- **Funkciók az engine-ben:** validálás (`is_move_legal`), lépések generálása (`generate_moves`), FEN kezelése, játék vége ellenőrzése.
- **SLA/Timeout:** minden engine kéréshez legyen timeout (pl. 2s). Ha az engine nem válaszol → szerver fallback: elutasítja a lépést vagy elfogadja lokálisan, attól függően.
---
## 8. UIServerEngine adatáramlás
- **Kliens → Szerver:** JSON üzenetek (lásd 4. rész).
- **Szerver → Engine:** függvényhívás vagy IPC hívás a board állás kapcsán.
- **Engine → Szerver:** válasz: legális/illegális, lehetséges lépések, új FEN.
- **Szerver → Kliens(ek):** a véglegesített, validált lépést, valamint állapot- és hibainformációkat.
---
## 9. Hálózat, üzemeltetés és deployment
- **Port:** alap WebSocket port (például `9001` vagy `8080`).
- **Bind cím:** `0.0.0.0` (LAN- és DDNS-elérést is lehetővé téve), dev környezetben `127.0.0.1` is használható.
- **Domain/DDNS:** a szerver elérhetővá tehető DDNS-en keresztül (pl. `mychess.ddns.net:9001`).
- **TLS:** ha publikus elérés szükséges, használj `wss://` TLS-t — pl. reverse proxy (nginx) terminálja a TLS-t és belsőleg csatlakozik `ws://`-on.
- **Self-hosted runner & CI:** a fejlesztői runner lehet persistens; minden workflow végén takarítás javasolt. Artefaktok feltöltése (logok) az Action-ökben.
---
## 10. Biztonság és jogosultságok
- **Input validáció:** a szerver soha ne bízzon a kliensben — minden lépést validálni kell az engine-nel.
- **Rate limiting:** egyszerű védelem (per IP/játékos) botok ellen.
- **TLS:** javasolt publikus hosztingnál.
- **Auth:** kezdetben opcionális, később token/username+password vagy OAuth implementálása.
---
## 11. Naplózás, hibakezelés és monitoring
- **Naplózási szint:** `info` alap, `debug` fejlesztéshez.
- **Naplófájlok:** per-meccs és per-játékos események — eseményeket timeframe-ekkel rögzíteni.
- **Error handling:** minden külső hívás (engine, disk, network) timeout-tal és visszapattanó logikával kezelve legyen.
- **Monitoring:** egyszerű health endpoint (HTTP) és process monitoring (systemd, Prometheus exporter később).
---
## 12. Tesztelés és CI/CD integráció
- **Unit tesztek:** rule engine, move validation, matchmaker logic.
- **Integration tesztek:** szerverkliens kommunikáció; mock engine használata.
- **CI:** GitHub Actions — teszt workflow-ok per-projekt (Engine/Server/UI). Rendszertervben előírt log exportálás a Google Sheets-be lehetőség.
---
## 13. Üzemeltetési kézikönyv (runbook)
- **Indítás:** `cargo run --release` vagy systemd service. Ajánlott: service fájl, ami a runner felhasználó alatt fut.
- **Stop:** graceful shutdown jelzés a futó meccsek befejezésére (vagy mentés után stop).
- **Frissítés:** stop → pull → `cargo build --release` → restart.
- **Hiba esetén:** ellenőrizd a naplókat, engine elérhetőségét, hálózati port forwardokat.
---
## 14. Fejlesztési roadmap és ajánlott következő lépések
1. Alap WebSocket server implementáció és egyszerű client teszt (lokálisan).
2. Shared message schema (JSON) és basic `Join/FindMatch/Move` támogatás.
3. Matchmaker + in-memory match tárolás.
4. Engine integráció (egy egyszerű lib vagy local process).
5. Reconnect és állapot-szinkronizáció (sync_state).
6. TLS és reverse proxy beállítása (ha publikus).
7. Perzisztencia (match history, eredmények).
8. Skálázás (ha szükséges: több match host, load balancing, stateless match managers).
---
## 15. Mellékletek — fontos konfigurációk
- **Environment változók**
- `SERVER_BIND=0.0.0.0:9001`
- `LOG_LEVEL=info`
- `ENGINE_PATH=/opt/knightly/engine` (ha külön process)
- **Ajánlott crate-ek**: `tokio`, `tokio-tungstenite`, `serde`, `serde_json`, `uuid`, `tracing`.
---
## Záró megjegyzés
Ez a dokumentum a diagram és a megbeszélések alapján készült. A terv elég részletes ahhoz, hogy a szerver fejlesztését megkezdjétek: tartalmazza az üzenetsémákat, a matchmaking logikát, az engine integrációs lehetőségeket és az üzemeltetési követelményeket.
Ha szeretnéd, legközelebb tudok készíteni belőle egy rövidebb fejlesztői checklistát (sprint backlog), vagy generálhatok egy külön implementációs tervet (fájlok/funkciók szerinti bontás).

View File

@@ -0,0 +1,4 @@
[target.x86_64-unknown-linux-gnu]
linker = "x86_64-linux-gnu-gcc"
[target.x86_64-pc-windows-gnu]
linker = "x86_64-w64-mingw32-gcc"

View File

@@ -0,0 +1,4 @@
[target.x86_64-unknown-linux-gnu]
linker = "x86_64-linux-gnu-gcc"
[target.x86_64-pc-windows-gnu]
linker = "x86_64-w64-mingw32-gcc"

4
ui/.cargo/config.toml Normal file
View File

@@ -0,0 +1,4 @@
[target.x86_64-unknown-linux-gnu]
linker = "x86_64-linux-gnu-gcc"
[target.x86_64-pc-windows-gnu]
linker = "x86_64-w64-mingw32-gcc"