From 2ae4d3b49fbc9b1564f273b137ae8ba132d52c65 Mon Sep 17 00:00:00 2001 From: Bobydeluxe <337467661+Bobydeluxe@users.noreply.github.com> Date: Fri, 23 Oct 2026 19:33:18 +0200 Subject: [PATCH 1/4] Add UNO with bots and customizable table rules --- .github/workflows/build.yml | 1 + .github/workflows/uno.yml | 53 + Makefile | 2 +- README.md | 5 +- docs/media/thumb_uno.png | Bin 0 -> 25578 bytes docs/play.md | 24 + games/games.json | 19 + games/uno/.gitignore | 2 + games/uno/ASSETS.md | 37 + games/uno/Makefile | 20 + games/uno/README.md | 135 ++ games/uno/VALIDATION.md | 126 ++ games/uno/docs/challenge.png | Bin 0 -> 11815 bytes games/uno/docs/gameplay.png | Bin 0 -> 22733 bytes games/uno/docs/interface.png | Bin 0 -> 37978 bytes games/uno/docs/launcher.png | Bin 0 -> 26467 bytes games/uno/docs/menu.png | Bin 0 -> 12095 bytes games/uno/docs/result.png | Bin 0 -> 10167 bytes games/uno/docs/review.png | Bin 0 -> 17820 bytes games/uno/docs/settings.png | Bin 0 -> 14623 bytes games/uno/docs/table-rules.png | Bin 0 -> 12156 bytes games/uno/docs/variants.png | Bin 0 -> 17493 bytes games/uno/src/assets.h | 2579 +++++++++++++++++++++++++++ games/uno/src/icon.png | Bin 0 -> 3732 bytes games/uno/src/main.c | 466 +++++ games/uno/src/save.h | 59 + games/uno/src/uno.c | 216 +++ games/uno/src/uno.h | 42 + games/uno/tests/eadk.h | 12 + games/uno/tests/legacy-save.bin | Bin 0 -> 768 bytes games/uno/tests/test_arm.py | 132 ++ games/uno/tests/test_engine.c | 143 ++ games/uno/tests/test_integration.py | 133 ++ games/uno/tests/test_ui.c | 100 ++ games/uno/tools/assets.json | 8 + games/uno/tools/assets.py | 59 + games/uno/tools/build.py | 59 + games/uno/tools/test.py | 11 + launcher/lang/fr.txt | 4 +- launcher/lang/zh.txt | 4 +- tests/test_games.py | 6 + 41 files changed, 4453 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/uno.yml create mode 100644 docs/media/thumb_uno.png create mode 100644 games/uno/.gitignore create mode 100644 games/uno/ASSETS.md create mode 100644 games/uno/Makefile create mode 100644 games/uno/README.md create mode 100644 games/uno/VALIDATION.md create mode 100644 games/uno/docs/challenge.png create mode 100644 games/uno/docs/gameplay.png create mode 100644 games/uno/docs/interface.png create mode 100644 games/uno/docs/launcher.png create mode 100644 games/uno/docs/menu.png create mode 100644 games/uno/docs/result.png create mode 100644 games/uno/docs/review.png create mode 100644 games/uno/docs/settings.png create mode 100644 games/uno/docs/table-rules.png create mode 100644 games/uno/docs/variants.png create mode 100644 games/uno/src/assets.h create mode 100644 games/uno/src/icon.png create mode 100644 games/uno/src/main.c create mode 100644 games/uno/src/save.h create mode 100644 games/uno/src/uno.c create mode 100644 games/uno/src/uno.h create mode 100644 games/uno/tests/eadk.h create mode 100644 games/uno/tests/legacy-save.bin create mode 100644 games/uno/tests/test_arm.py create mode 100644 games/uno/tests/test_engine.c create mode 100644 games/uno/tests/test_integration.py create mode 100644 games/uno/tests/test_ui.c create mode 100644 games/uno/tools/assets.json create mode 100644 games/uno/tools/assets.py create mode 100644 games/uno/tools/build.py create mode 100644 games/uno/tools/test.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0602184c..49628a8f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -86,6 +86,7 @@ jobs: make -C games/doodlejump host test make -C games/stickmanhook host test make -C games/coreball host test + make -C games/uno test HOST_CC=gcc diff --git a/.github/workflows/uno.yml b/.github/workflows/uno.yml new file mode 100644 index 00000000..32f7a609 --- /dev/null +++ b/.github/workflows/uno.yml @@ -0,0 +1,53 @@ +name: UNO + +on: + pull_request: + paths: + - 'games/uno/**' + - 'games/common/**' + - 'launcher/src/**' + - 'games/games.json' + - 'Makefile' + - 'tools/emu.py' + - 'tools/gen_games.py' + - 'tools/npmodule.py' + - '.github/workflows/uno.yml' + workflow_dispatch: + +permissions: + contents: read + +jobs: + game: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: ARM toolchain + run: | + v=15.2.1-1.1 + curl -fsSL "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v$v/xpack-arm-none-eabi-gcc-$v-linux-x64.tar.gz" | tar -xz -C "$RUNNER_TEMP" + echo "$RUNNER_TEMP/xpack-arm-none-eabi-gcc-$v/bin" >> "$GITHUB_PATH" + - uses: actions/setup-node@v4 + with: + node-version: 20 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Tools + run: | + npm install -g nwlink@1.0.0 + pip install pillow==11.3.0 numpy pyelftools unicorn==2.1.4 + - name: Standalone and NumPlay module builds + run: make build/data/apps/UNO.nwa build/data/modules/uno.o NWLINK=nwlink + - name: Card rules, single-game wins and save migration + run: make -C games/uno test HOST_CC=gcc + - name: ARM controls and firmware memory guards + run: python3 games/uno/tests/test_arm.py --nwlink nwlink + - name: NumPlay launcher, shared saves and reinstall backup + run: python3 games/uno/tests/test_integration.py --nwlink nwlink + - name: Repository save-and-exit scenario + run: python3 tests/test_games.py build/data/apps --game uno + - uses: actions/upload-artifact@v4 + with: + name: UNO + path: build/data/apps/UNO.nwa diff --git a/Makefile b/Makefile index c683fb0e..ae93ef1b 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ APP_SPACE_APPS = HillClimbRacing # the games that fit it (NumPlay draws their text there: see launcher/src/compat.c) UPSILON_RAM = 107674 UPSILON_GAMES = crossyroad blockblast suika portal tetris dinorun doodlejump chess flappybird flappydunk towerblock coreball pacman \ - snake connectfour solitaire g2048 minesweeper breakout twoplayer invaders sudoku uttt sokoban + snake connectfour solitaire g2048 minesweeper breakout twoplayer invaders sudoku uttt sokoban uno # NumPlay and its discreet versions: the same app, with another name and icon # on the calculator's home screen. Each one is a release file. diff --git a/README.md b/README.md index ece2d770..f9541a69 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@
- 29 free games for your NumWorks calculator, in one app.
+ 30 free games for your NumWorks calculator, in one app.
Plus 21 big games that install on their own. For the N0110, N0115 and N0120, in English, French and Chinese.