├── tests ├── .gitignore ├── saved_state │ ├── .gitignore │ ├── test.sh │ └── CMakeLists.txt ├── CMakeLists.txt ├── go │ └── go_tests.lua └── chess │ └── chess_test.lua ├── .dockerignore ├── src ├── android │ ├── .idea │ │ ├── .name │ │ ├── compiler.xml │ │ ├── kotlinc.xml │ │ ├── vcs.xml │ │ ├── deploymentTargetDropDown.xml │ │ ├── gradle.xml │ │ ├── jarRepositories.xml │ │ └── misc.xml │ ├── app │ │ ├── .gitignore │ │ ├── src │ │ │ └── main │ │ │ │ ├── assets │ │ │ │ └── .gitignore │ │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── dimens.xml │ │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── menu │ │ │ │ │ └── menu_main.xml │ │ │ │ ├── layout │ │ │ │ │ ├── fragment_local_client_web_view.xml │ │ │ │ │ ├── content_main.xml │ │ │ │ │ ├── content_server_monitoring.xml │ │ │ │ │ ├── server_monitor_activity.xml │ │ │ │ │ ├── activity_main.xml │ │ │ │ │ ├── fragment_first.xml │ │ │ │ │ ├── fragment_host_or_local.xml │ │ │ │ │ └── fragment_second.xml │ │ │ │ ├── drawable │ │ │ │ │ └── ic_stop.xml │ │ │ │ └── navigation │ │ │ │ │ └── server_monitoring_nav_graph.xml │ │ │ │ ├── ic_launcher-playstore.png │ │ │ │ ├── java │ │ │ │ └── net │ │ │ │ │ └── alexbarry │ │ │ │ │ └── alexgames │ │ │ │ │ ├── network │ │ │ │ │ ├── ISendMsg.java │ │ │ │ │ ├── IMsgRecvd.java │ │ │ │ │ └── ClientSession.java │ │ │ │ │ ├── AlexConstants.java │ │ │ │ │ ├── popup │ │ │ │ │ ├── IAlexGamesPopupManager.java │ │ │ │ │ └── PopupManagerImpl.java │ │ │ │ │ ├── util │ │ │ │ │ ├── StringFuncs.java │ │ │ │ │ └── TouchEvtToClickEvt.java │ │ │ │ │ ├── graphics │ │ │ │ │ └── IAlexGamesCanvas.java │ │ │ │ │ ├── AlexGamesViewModel.java │ │ │ │ │ ├── server │ │ │ │ │ ├── ServerMonitorViewModel.java │ │ │ │ │ └── GameServerBinder.java │ │ │ │ │ └── SecondFragment.java │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── cpp │ │ │ │ └── CMakeLists.txt │ │ ├── proguard-rules.pro │ │ └── build.gradle │ ├── settings.gradle │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── .gitignore │ ├── cp_games_assets.sh │ ├── build.gradle │ ├── gradle.properties │ ├── adb_copy_files.sh │ └── README.md ├── rust_games │ ├── .gitignore │ ├── trivia │ │ └── mod.rs │ ├── libs │ │ ├── mod.rs │ │ └── point.rs │ ├── reversi │ │ └── mod.rs │ ├── config.toml │ ├── gem_match │ │ ├── mod.rs │ │ └── gem_match_serialize.rs │ ├── Cargo.toml │ ├── rust_game_api.h │ └── README.md ├── server │ ├── socket │ │ ├── test │ │ │ ├── .gitignore │ │ │ ├── build_client.sh │ │ │ ├── build_server.sh │ │ │ ├── test_client.c │ │ │ └── test_server.c │ │ └── socket_server.h │ └── ws │ │ └── requirements.txt ├── html │ ├── cache.manifest │ ├── manifest.json │ ├── js │ │ ├── collapsable.js │ │ ├── url_args.js │ │ ├── alexgames_c_dict.js │ │ └── alexgames_colour_pref.js │ └── css │ │ ├── style_collapsable.css │ │ ├── style_dark.css │ │ └── style_very_dark.css ├── emscripten │ ├── emscripten_dict_api.h │ └── emscripten_c_dict_api.c ├── lua_api │ ├── lua_api_dict.h │ ├── lua_user_cfg.h │ ├── lua_api_utils.h │ ├── lua_api.h │ └── lua_api_utils.c ├── cpp_libs │ ├── game_api_helper │ │ └── game_api_helper.h │ ├── history_browse_ui │ │ └── history_browse_ui.h │ ├── sqlite_saved_state │ │ ├── README.md │ │ ├── CMakeLists.txt │ │ └── sqlite_saved_state.h │ ├── mouse_scroll_handler │ │ ├── mouse_scroll_handler.h │ │ └── mouse_scroll_handler.cpp │ ├── utils │ │ └── str_eq_literal.h │ ├── touch_scroll_handler │ │ ├── touch_scroll_handler.h │ │ └── touch_scroll_handler.cpp │ ├── touch_press_handler │ │ ├── touch_press_handler.h │ │ └── touch_press_handler.cpp │ ├── saved_state_db │ │ ├── saved_state_db_c_api.h │ │ ├── README.md │ │ └── saved_state_db_c_api.cpp │ └── button_helper │ │ └── button_helper.h ├── dictionary │ ├── dict_utils.py │ ├── c_dictionary.h │ ├── CMakeLists.txt │ ├── dictionary.h │ └── wip │ │ └── words_to_remove.txt ├── alexgames_config.h.in ├── game_api │ ├── game_api_utils.h │ ├── game_api_words.c │ └── game_api_words.h ├── lua_scripts │ ├── libs │ │ ├── dice │ │ │ ├── dice.lua │ │ │ └── dice_draw.lua │ │ ├── shuffle.lua │ │ ├── cards │ │ │ ├── cards_set.lua │ │ │ └── card_test.lua │ │ ├── draw │ │ │ ├── draw_colours.lua │ │ │ └── draw_shapes.lua │ │ ├── ui │ │ │ ├── show_buttons_popup.lua │ │ │ └── touchpad.lua │ │ ├── serialize │ │ │ └── storage_helpers.lua │ │ └── touch_to_mouse_evts.lua │ └── games │ │ ├── crossword_letters │ │ ├── list_right_diffs.py │ │ └── list_puzzle_words.lua │ │ ├── sudoku │ │ └── sudoku_main.lua │ │ ├── go │ │ └── go_ctrl.lua │ │ ├── wu │ │ └── wu_ctrl.lua │ │ ├── chess │ │ └── chess_serialize.lua │ │ ├── blue │ │ └── blue_main.lua │ │ ├── life │ │ ├── life_draw.lua │ │ └── life_main.lua │ │ ├── endless_runner │ │ └── endless_runner_main.lua │ │ ├── swarm │ │ ├── swarm_keyboard_input.lua │ │ └── swarm_main.lua │ │ ├── thrust │ │ └── thrust_keyboard_input.lua │ │ ├── word_mastermind │ │ └── word_mastermind_serialize.lua │ │ ├── test │ │ ├── draw_graphics_test.lua │ │ └── timer_test.lua │ │ └── fluid_mix │ │ └── fluid_mix_serialize.lua └── ui_wxWidgets │ ├── wx_network_ui.h │ ├── wx_game_popup.h │ └── wx_network.h ├── metadata └── en-US │ ├── changelogs │ └── 1.txt │ ├── short_description.txt │ ├── images │ ├── icon.png │ └── phoneScreenshots │ │ ├── screenshot3-chess.png │ │ ├── screenshot1-solitaire.png │ │ ├── screenshot5-play_or_host.png │ │ ├── screenshot4-word_mastermind.png │ │ └── screenshot2-crossword_letters.png │ └── full_description.txt ├── img ├── arrow.png ├── logo.png ├── spider.png ├── favicon.png ├── black_piece.png ├── brick_wall.png ├── cards │ ├── clubs.png │ ├── hearts.png │ ├── spades.png │ ├── blank_card.png │ ├── diamonds.png │ ├── card_facedown.png │ ├── card_highlight.png │ ├── blank_card.svg │ └── card_highlight.svg ├── dice │ ├── dice1.png │ ├── dice2.png │ ├── dice3.png │ ├── dice4.png │ ├── dice5.png │ └── dice6.png ├── space │ ├── ship1.png │ └── lunar_lander.png ├── white_piece.png ├── game_icons │ ├── go.png │ ├── wu.png │ ├── 31s.png │ ├── chess.png │ ├── crib.png │ ├── life.png │ ├── reversi.png │ ├── thrust.png │ ├── backgammon.png │ ├── card_sim.png │ ├── checkers.png │ ├── fluid_mix.png │ ├── gem_match.png │ ├── hospital.png │ ├── solitaire.png │ ├── minesweeper.png │ ├── spider_swing.png │ ├── endless_runner.png │ ├── word_mastermind.png │ └── crossword_letters.png ├── hospital │ ├── bed1.png │ ├── doctor1.png │ ├── doctor2.png │ ├── doctor3.png │ ├── doctor4.png │ ├── favicon.png │ ├── patient1.png │ ├── ui │ │ ├── dirpad.png │ │ ├── menu_button.png │ │ ├── thumb_buttons.png │ │ ├── progress_circle.png │ │ ├── action_needed_arrow.png │ │ └── tutorial │ │ │ ├── need_aed.png │ │ │ └── need_cpr.png │ ├── bed1-flipped.png │ ├── doctor-head.png │ ├── floor_tile.png │ ├── oxygen_tank.png │ ├── ventilator.png │ ├── xray_sheet.png │ ├── xray_source.png │ ├── doctor-outline.png │ ├── floor_tile_bad.png │ ├── iv_stand_bag1.png │ ├── patient_in_bed.png │ ├── floor_highlight.png │ ├── green_cross_icon.png │ ├── defibrillator_sabrina.png │ ├── patient_in_bed-flipped.png │ ├── patient_need_icons │ │ ├── bg.png │ │ ├── bg_fixer.png │ │ ├── attention.png │ │ ├── low_fluids.png │ │ ├── low_oxygen.png │ │ ├── broken_bone.png │ │ └── no_heartbeat.png │ ├── patient_progress_bar_icon_needs.png │ └── patient_progress_bar_icon_satisfied.png ├── more_info_btn.png ├── wooden_board.png ├── chess │ ├── king_black.png │ ├── king_white.png │ ├── pawn_black.png │ ├── pawn_white.png │ ├── rook_black.png │ ├── rook_white.png │ ├── bishop_black.png │ ├── bishop_white.png │ ├── knight_black.png │ ├── knight_white.png │ ├── queen_black.png │ ├── queen_white.png │ ├── king_black_dark.png │ ├── pawn_black_dark.png │ ├── rook_black_dark.png │ ├── bishop_black_dark.png │ ├── knight_black_dark.png │ └── queen_black_dark.png ├── logo-transparent.png ├── minesweeper │ ├── box1.png │ ├── box2.png │ ├── box3.png │ ├── box4.png │ ├── box5.png │ ├── box6.png │ ├── box7.png │ ├── box8.png │ ├── mine.png │ ├── box_empty.png │ ├── box_unclicked.png │ ├── box_flagged_blue.png │ └── box_flagged_red.png ├── piece_highlight.png ├── piece_king_icon.png ├── swarm │ └── grass_bg1.png ├── backgammon │ ├── black_triangle.png │ ├── triangle_black.png │ ├── triangle_white.png │ └── triangle_highlight.png ├── credits │ └── Lua-Logo_128x128.png ├── black_piece.svg ├── white_piece.svg ├── wooden_board.svg └── piece_highlight.svg ├── .gitignore ├── docker ├── http_server │ ├── start_http_server.sh │ ├── build.sh │ └── Dockerfile.build_wasm └── ws_server │ └── Dockerfile ├── docker-compose.yml ├── .github └── workflows │ ├── build.yml │ └── docker-image.yml ├── local_env.cmake ├── clean.sh └── BUILD.md /tests/.gitignore: -------------------------------------------------------------------------------- 1 | out/ 2 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | build/wasm/out/ 2 | -------------------------------------------------------------------------------- /src/android/.idea/.name: -------------------------------------------------------------------------------- 1 | AlexGames -------------------------------------------------------------------------------- /src/android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /src/rust_games/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | -------------------------------------------------------------------------------- /src/server/socket/test/.gitignore: -------------------------------------------------------------------------------- 1 | out/ 2 | -------------------------------------------------------------------------------- /tests/saved_state/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | out/ 3 | -------------------------------------------------------------------------------- /src/rust_games/trivia/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod trivia_main; 2 | -------------------------------------------------------------------------------- /metadata/en-US/changelogs/1.txt: -------------------------------------------------------------------------------- 1 | Initial android release. 2 | -------------------------------------------------------------------------------- /src/rust_games/libs/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod point; 2 | pub mod swipe_tracker; 3 | -------------------------------------------------------------------------------- /src/server/ws/requirements.txt: -------------------------------------------------------------------------------- 1 | asyncio==3.4.3 2 | websockets==11.0.3 3 | -------------------------------------------------------------------------------- /img/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/arrow.png -------------------------------------------------------------------------------- /img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/logo.png -------------------------------------------------------------------------------- /img/spider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/spider.png -------------------------------------------------------------------------------- /src/android/app/src/main/assets/.gitignore: -------------------------------------------------------------------------------- 1 | games/ 2 | html/ 3 | words-en.txt 4 | -------------------------------------------------------------------------------- /src/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name='AlexGames' 2 | include ':app' 3 | -------------------------------------------------------------------------------- /src/rust_games/reversi/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod reversi_core; 2 | pub mod reversi_main; 3 | -------------------------------------------------------------------------------- /img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/favicon.png -------------------------------------------------------------------------------- /src/html/cache.manifest: -------------------------------------------------------------------------------- 1 | CACHE MANIFEST 2 | 3 | # Version 1.0002 4 | 5 | NETWORK: * 6 | -------------------------------------------------------------------------------- /src/rust_games/config.toml: -------------------------------------------------------------------------------- 1 | #[target.wasm32-unknown-unknown] 2 | #linker = "emcc" 3 | -------------------------------------------------------------------------------- /src/server/socket/test/build_client.sh: -------------------------------------------------------------------------------- 1 | gcc test_client.c -I.. ../*.c -o out/client 2 | -------------------------------------------------------------------------------- /img/black_piece.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/black_piece.png -------------------------------------------------------------------------------- /img/brick_wall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/brick_wall.png -------------------------------------------------------------------------------- /img/cards/clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/cards/clubs.png -------------------------------------------------------------------------------- /img/dice/dice1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/dice/dice1.png -------------------------------------------------------------------------------- /img/dice/dice2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/dice/dice2.png -------------------------------------------------------------------------------- /img/dice/dice3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/dice/dice3.png -------------------------------------------------------------------------------- /img/dice/dice4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/dice/dice4.png -------------------------------------------------------------------------------- /img/dice/dice5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/dice/dice5.png -------------------------------------------------------------------------------- /img/dice/dice6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/dice/dice6.png -------------------------------------------------------------------------------- /img/space/ship1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/space/ship1.png -------------------------------------------------------------------------------- /img/white_piece.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/white_piece.png -------------------------------------------------------------------------------- /metadata/en-US/short_description.txt: -------------------------------------------------------------------------------- 1 | Play simple Lua/Rust games, host web games server 2 | -------------------------------------------------------------------------------- /img/cards/hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/cards/hearts.png -------------------------------------------------------------------------------- /img/cards/spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/cards/spades.png -------------------------------------------------------------------------------- /img/game_icons/go.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/go.png -------------------------------------------------------------------------------- /img/game_icons/wu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/wu.png -------------------------------------------------------------------------------- /img/hospital/bed1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/bed1.png -------------------------------------------------------------------------------- /img/more_info_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/more_info_btn.png -------------------------------------------------------------------------------- /img/wooden_board.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/wooden_board.png -------------------------------------------------------------------------------- /img/cards/blank_card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/cards/blank_card.png -------------------------------------------------------------------------------- /img/cards/diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/cards/diamonds.png -------------------------------------------------------------------------------- /img/chess/king_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/chess/king_black.png -------------------------------------------------------------------------------- /img/chess/king_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/chess/king_white.png -------------------------------------------------------------------------------- /img/chess/pawn_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/chess/pawn_black.png -------------------------------------------------------------------------------- /img/chess/pawn_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/chess/pawn_white.png -------------------------------------------------------------------------------- /img/chess/rook_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/chess/rook_black.png -------------------------------------------------------------------------------- /img/chess/rook_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/chess/rook_white.png -------------------------------------------------------------------------------- /img/game_icons/31s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/31s.png -------------------------------------------------------------------------------- /img/game_icons/chess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/chess.png -------------------------------------------------------------------------------- /img/game_icons/crib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/crib.png -------------------------------------------------------------------------------- /img/game_icons/life.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/life.png -------------------------------------------------------------------------------- /img/hospital/doctor1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/doctor1.png -------------------------------------------------------------------------------- /img/hospital/doctor2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/doctor2.png -------------------------------------------------------------------------------- /img/hospital/doctor3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/doctor3.png -------------------------------------------------------------------------------- /img/hospital/doctor4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/doctor4.png -------------------------------------------------------------------------------- /img/hospital/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/favicon.png -------------------------------------------------------------------------------- /img/logo-transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/logo-transparent.png -------------------------------------------------------------------------------- /img/minesweeper/box1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/minesweeper/box1.png -------------------------------------------------------------------------------- /img/minesweeper/box2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/minesweeper/box2.png -------------------------------------------------------------------------------- /img/minesweeper/box3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/minesweeper/box3.png -------------------------------------------------------------------------------- /img/minesweeper/box4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/minesweeper/box4.png -------------------------------------------------------------------------------- /img/minesweeper/box5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/minesweeper/box5.png -------------------------------------------------------------------------------- /img/minesweeper/box6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/minesweeper/box6.png -------------------------------------------------------------------------------- /img/minesweeper/box7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/minesweeper/box7.png -------------------------------------------------------------------------------- /img/minesweeper/box8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/minesweeper/box8.png -------------------------------------------------------------------------------- /img/minesweeper/mine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/minesweeper/mine.png -------------------------------------------------------------------------------- /img/piece_highlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/piece_highlight.png -------------------------------------------------------------------------------- /img/piece_king_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/piece_king_icon.png -------------------------------------------------------------------------------- /img/swarm/grass_bg1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/swarm/grass_bg1.png -------------------------------------------------------------------------------- /img/chess/bishop_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/chess/bishop_black.png -------------------------------------------------------------------------------- /img/chess/bishop_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/chess/bishop_white.png -------------------------------------------------------------------------------- /img/chess/knight_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/chess/knight_black.png -------------------------------------------------------------------------------- /img/chess/knight_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/chess/knight_white.png -------------------------------------------------------------------------------- /img/chess/queen_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/chess/queen_black.png -------------------------------------------------------------------------------- /img/chess/queen_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/chess/queen_white.png -------------------------------------------------------------------------------- /img/game_icons/reversi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/reversi.png -------------------------------------------------------------------------------- /img/game_icons/thrust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/thrust.png -------------------------------------------------------------------------------- /img/hospital/patient1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/patient1.png -------------------------------------------------------------------------------- /img/hospital/ui/dirpad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/ui/dirpad.png -------------------------------------------------------------------------------- /img/space/lunar_lander.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/space/lunar_lander.png -------------------------------------------------------------------------------- /img/cards/card_facedown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/cards/card_facedown.png -------------------------------------------------------------------------------- /img/cards/card_highlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/cards/card_highlight.png -------------------------------------------------------------------------------- /img/chess/king_black_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/chess/king_black_dark.png -------------------------------------------------------------------------------- /img/chess/pawn_black_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/chess/pawn_black_dark.png -------------------------------------------------------------------------------- /img/chess/rook_black_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/chess/rook_black_dark.png -------------------------------------------------------------------------------- /img/game_icons/backgammon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/backgammon.png -------------------------------------------------------------------------------- /img/game_icons/card_sim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/card_sim.png -------------------------------------------------------------------------------- /img/game_icons/checkers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/checkers.png -------------------------------------------------------------------------------- /img/game_icons/fluid_mix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/fluid_mix.png -------------------------------------------------------------------------------- /img/game_icons/gem_match.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/gem_match.png -------------------------------------------------------------------------------- /img/game_icons/hospital.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/hospital.png -------------------------------------------------------------------------------- /img/game_icons/solitaire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/solitaire.png -------------------------------------------------------------------------------- /img/hospital/bed1-flipped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/bed1-flipped.png -------------------------------------------------------------------------------- /img/hospital/doctor-head.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/doctor-head.png -------------------------------------------------------------------------------- /img/hospital/floor_tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/floor_tile.png -------------------------------------------------------------------------------- /img/hospital/oxygen_tank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/oxygen_tank.png -------------------------------------------------------------------------------- /img/hospital/ventilator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/ventilator.png -------------------------------------------------------------------------------- /img/hospital/xray_sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/xray_sheet.png -------------------------------------------------------------------------------- /img/hospital/xray_source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/xray_source.png -------------------------------------------------------------------------------- /img/minesweeper/box_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/minesweeper/box_empty.png -------------------------------------------------------------------------------- /img/chess/bishop_black_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/chess/bishop_black_dark.png -------------------------------------------------------------------------------- /img/chess/knight_black_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/chess/knight_black_dark.png -------------------------------------------------------------------------------- /img/chess/queen_black_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/chess/queen_black_dark.png -------------------------------------------------------------------------------- /img/game_icons/minesweeper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/minesweeper.png -------------------------------------------------------------------------------- /img/game_icons/spider_swing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/spider_swing.png -------------------------------------------------------------------------------- /img/hospital/doctor-outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/doctor-outline.png -------------------------------------------------------------------------------- /img/hospital/floor_tile_bad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/floor_tile_bad.png -------------------------------------------------------------------------------- /img/hospital/iv_stand_bag1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/iv_stand_bag1.png -------------------------------------------------------------------------------- /img/hospital/patient_in_bed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/patient_in_bed.png -------------------------------------------------------------------------------- /img/hospital/ui/menu_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/ui/menu_button.png -------------------------------------------------------------------------------- /metadata/en-US/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/metadata/en-US/images/icon.png -------------------------------------------------------------------------------- /img/backgammon/black_triangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/backgammon/black_triangle.png -------------------------------------------------------------------------------- /img/backgammon/triangle_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/backgammon/triangle_black.png -------------------------------------------------------------------------------- /img/backgammon/triangle_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/backgammon/triangle_white.png -------------------------------------------------------------------------------- /img/credits/Lua-Logo_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/credits/Lua-Logo_128x128.png -------------------------------------------------------------------------------- /img/game_icons/endless_runner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/endless_runner.png -------------------------------------------------------------------------------- /img/game_icons/word_mastermind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/word_mastermind.png -------------------------------------------------------------------------------- /img/hospital/floor_highlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/floor_highlight.png -------------------------------------------------------------------------------- /img/hospital/green_cross_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/green_cross_icon.png -------------------------------------------------------------------------------- /img/hospital/ui/thumb_buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/ui/thumb_buttons.png -------------------------------------------------------------------------------- /img/minesweeper/box_unclicked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/minesweeper/box_unclicked.png -------------------------------------------------------------------------------- /img/game_icons/crossword_letters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/game_icons/crossword_letters.png -------------------------------------------------------------------------------- /img/hospital/ui/progress_circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/ui/progress_circle.png -------------------------------------------------------------------------------- /img/minesweeper/box_flagged_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/minesweeper/box_flagged_blue.png -------------------------------------------------------------------------------- /img/minesweeper/box_flagged_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/minesweeper/box_flagged_red.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16dp 3 | 4 | -------------------------------------------------------------------------------- /img/backgammon/triangle_highlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/backgammon/triangle_highlight.png -------------------------------------------------------------------------------- /img/hospital/defibrillator_sabrina.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/defibrillator_sabrina.png -------------------------------------------------------------------------------- /img/hospital/patient_in_bed-flipped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/patient_in_bed-flipped.png -------------------------------------------------------------------------------- /img/hospital/patient_need_icons/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/patient_need_icons/bg.png -------------------------------------------------------------------------------- /img/hospital/ui/action_needed_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/ui/action_needed_arrow.png -------------------------------------------------------------------------------- /img/hospital/ui/tutorial/need_aed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/ui/tutorial/need_aed.png -------------------------------------------------------------------------------- /img/hospital/ui/tutorial/need_cpr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/ui/tutorial/need_cpr.png -------------------------------------------------------------------------------- /src/server/socket/test/build_server.sh: -------------------------------------------------------------------------------- 1 | set -e 2 | set -u 3 | set -x 4 | 5 | gcc test_server.c -I.. ../*.c -o out/server -lpthread 6 | -------------------------------------------------------------------------------- /img/hospital/patient_need_icons/bg_fixer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/patient_need_icons/bg_fixer.png -------------------------------------------------------------------------------- /src/emscripten/emscripten_dict_api.h: -------------------------------------------------------------------------------- 1 | #include "game_api_words.h" 2 | 3 | const struct game_dict_api *get_emscripten_game_dict_api(void); 4 | -------------------------------------------------------------------------------- /img/hospital/patient_need_icons/attention.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/patient_need_icons/attention.png -------------------------------------------------------------------------------- /img/hospital/patient_need_icons/low_fluids.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/patient_need_icons/low_fluids.png -------------------------------------------------------------------------------- /img/hospital/patient_need_icons/low_oxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/patient_need_icons/low_oxygen.png -------------------------------------------------------------------------------- /src/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/src/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src/rust_games/gem_match/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod gem_match_core; 2 | pub mod gem_match_draw; 3 | pub mod gem_match_main; 4 | pub mod gem_match_serialize; 5 | -------------------------------------------------------------------------------- /img/hospital/patient_need_icons/broken_bone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/patient_need_icons/broken_bone.png -------------------------------------------------------------------------------- /img/hospital/patient_need_icons/no_heartbeat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/patient_need_icons/no_heartbeat.png -------------------------------------------------------------------------------- /img/hospital/patient_progress_bar_icon_needs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/patient_progress_bar_icon_needs.png -------------------------------------------------------------------------------- /src/lua_api/lua_api_dict.h: -------------------------------------------------------------------------------- 1 | #include "game_api_words.h" 2 | 3 | void init_lua_alex_dict(void *L, const char *name, const struct game_dict_api *api); 4 | -------------------------------------------------------------------------------- /src/android/app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/src/android/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /img/hospital/patient_progress_bar_icon_satisfied.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/img/hospital/patient_progress_bar_icon_satisfied.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/src/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/src/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/src/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/src/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /metadata/en-US/images/phoneScreenshots/screenshot3-chess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/metadata/en-US/images/phoneScreenshots/screenshot3-chess.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/src/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /metadata/en-US/images/phoneScreenshots/screenshot1-solitaire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/metadata/en-US/images/phoneScreenshots/screenshot1-solitaire.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/src/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/src/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/src/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/src/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/src/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /src/cpp_libs/game_api_helper/game_api_helper.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "game_api.h" 5 | 6 | struct game_api_callbacks create_default_callbacks(void); 7 | -------------------------------------------------------------------------------- /metadata/en-US/images/phoneScreenshots/screenshot5-play_or_host.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/metadata/en-US/images/phoneScreenshots/screenshot5-play_or_host.png -------------------------------------------------------------------------------- /metadata/en-US/images/phoneScreenshots/screenshot4-word_mastermind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/metadata/en-US/images/phoneScreenshots/screenshot4-word_mastermind.png -------------------------------------------------------------------------------- /src/android/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #687071 4 | -------------------------------------------------------------------------------- /metadata/en-US/images/phoneScreenshots/screenshot2-crossword_letters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexbarry/AlexGames/HEAD/metadata/en-US/images/phoneScreenshots/screenshot2-crossword_letters.png -------------------------------------------------------------------------------- /src/android/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/android/.idea/kotlinc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /src/android/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/android/app/src/main/java/net/alexbarry/alexgames/network/ISendMsg.java: -------------------------------------------------------------------------------- 1 | package net.alexbarry.alexgames.network; 2 | 3 | public interface ISendMsg { 4 | public void send_msg(String dst, byte[] msg, int msg_len); 5 | } 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | cscope.out 2 | third_party/ 3 | old/ 4 | logs/ 5 | out/ 6 | .*.swp 7 | .*.swo 8 | .DS_Store 9 | __pycache__ 10 | 11 | # LibreOffice spreadsheets in plaintext (to be git-friendly) 12 | .~lock.*.fods# 13 | 14 | venv 15 | -------------------------------------------------------------------------------- /src/cpp_libs/history_browse_ui/history_browse_ui.h: -------------------------------------------------------------------------------- 1 | #include "game_api.h" 2 | 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | const struct game_api *get_history_browse_api(void); 8 | 9 | #ifdef __cplusplus 10 | } 11 | #endif 12 | -------------------------------------------------------------------------------- /src/android/app/src/main/java/net/alexbarry/alexgames/AlexConstants.java: -------------------------------------------------------------------------------- 1 | package net.alexbarry.alexgames; 2 | 3 | public class AlexConstants { 4 | public static final String HOST_SERVER_SERVICE_NOTIFICATION_CHANNEL_ID = "ServiceNotifications"; 5 | } 6 | -------------------------------------------------------------------------------- /src/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /tests/saved_state/test.sh: -------------------------------------------------------------------------------- 1 | set -e 2 | set -u 3 | set -x 4 | 5 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" 6 | cd "${DIR}" 7 | 8 | mkdir -p out 9 | cd out/ 10 | 11 | cmake make ../ 12 | cmake --build . $@ 13 | ./test_saved_state 14 | -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #6200EE 4 | #3700B3 5 | #03DAC5 6 | 7 | -------------------------------------------------------------------------------- /src/android/app/src/main/java/net/alexbarry/alexgames/network/IMsgRecvd.java: -------------------------------------------------------------------------------- 1 | package net.alexbarry.alexgames.network; 2 | 3 | public interface IMsgRecvd { 4 | public void handle_msg_received(String src, byte[] data, int data_len); 5 | public void disconnected(String src); 6 | } 7 | -------------------------------------------------------------------------------- /src/dictionary/dict_utils.py: -------------------------------------------------------------------------------- 1 | def read_word_list(fname): 2 | words = set() 3 | with open(fname, 'r') as f: 4 | for line in f: 5 | if line.startswith('#'): continue 6 | if not line.strip(): continue 7 | word = line.strip() 8 | words.add(word) 9 | return words 10 | 11 | -------------------------------------------------------------------------------- /src/cpp_libs/sqlite_saved_state/README.md: -------------------------------------------------------------------------------- 1 | # sqlite saved state 2 | 3 | In a browser, `window.localStorage` already provides a fairly convenient key/value storage that persists. 4 | 5 | In other platforms, one convenient option is to include sqlite and use an sqlite database for key/value storage. 6 | -------------------------------------------------------------------------------- /docker/http_server/start_http_server.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" 4 | cd "${DIR}/../../" 5 | 6 | sudo docker run \ 7 | --rm \ 8 | -v $(pwd)/build/wasm/out/http_out:/usr/share/nginx/html/ \ 9 | -p 1234:80 \ 10 | "nginx:latest" 11 | -------------------------------------------------------------------------------- /src/android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | -------------------------------------------------------------------------------- /src/cpp_libs/sqlite_saved_state/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | add_library(alexgames_sqlite_saved_state STATIC 4 | sqlite_saved_state.c) 5 | target_include_directories(alexgames_sqlite_saved_state PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) 6 | 7 | target_link_libraries(alexgames_sqlite_saved_state PUBLIC sqlite3) 8 | -------------------------------------------------------------------------------- /src/lua_api/lua_user_cfg.h: -------------------------------------------------------------------------------- 1 | int luaopen_alexlib(lua_State *L); 2 | 3 | // If I understand correctly, this is needed to include 4 | // the library in the command line lua interpreter. 5 | // But calling luaL_requiref(L, "alexgames", luaopen_alexlib, 0) 6 | // is enough 7 | //#define LUA_EXTRALIBS { "alexgames", luaopen_alexlib }, 8 | -------------------------------------------------------------------------------- /src/alexgames_config.h.in: -------------------------------------------------------------------------------- 1 | 2 | #define PROJECT_NAME "@PROJECT_NAME@" 3 | #define PROJECT_VERSION "@PROJECT_VERSION@" 4 | #define GIT_HEAD_HASH "@GIT_HEAD_HASH@" 5 | 6 | #define PROJECT_VERSION_MAJOR "@PROJECT_VERSION_MAJOR@" 7 | #define PROJECT_VERSION_MINOR "@PROJECT_VERSION_MINOR@" 8 | #define PROJECT_VERSION_PATCH "@PROJECT_VERSION_PATCH@" 9 | -------------------------------------------------------------------------------- /src/dictionary/c_dictionary.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "game_api_words.h" 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | void *build_word_dict_from_file(const char *fname); 10 | 11 | 12 | const struct game_dict_api *get_game_dict_api(void); 13 | const struct game_dict_api *get_c_dictionary_api(void); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | -------------------------------------------------------------------------------- /src/game_api/game_api_utils.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | size_t b64_encoded_size_to_max_decoded_size(size_t encoded_input_len); 4 | 5 | size_t write_b64(char *state_out, size_t state_out_len, const uint8_t *input_buff, size_t input_buff_len); 6 | size_t decode_b64(uint8_t *decoded_out, size_t decoded_out_max_len, 7 | const char *encoded_input, size_t encoded_input_len); 8 | -------------------------------------------------------------------------------- /src/lua_scripts/libs/dice/dice.lua: -------------------------------------------------------------------------------- 1 | 2 | local dice = {} 3 | 4 | function dice.roll_dice(dice_max) 5 | return math.random(1,dice_max) 6 | end 7 | 8 | function dice.roll_multiple_dice(num_dice, dice_max) 9 | local ary = {} 10 | for i=1,num_dice do 11 | table.insert(ary, dice.roll_dice(dice_max)) 12 | end 13 | return ary 14 | end 15 | 16 | return dice 17 | -------------------------------------------------------------------------------- /src/cpp_libs/mouse_scroll_handler/mouse_scroll_handler.h: -------------------------------------------------------------------------------- 1 | #include "game_api.h" 2 | 3 | class MouseScrollHandler { 4 | 5 | public: 6 | int handle_mousemove(int pos_y, int pos_x, int buttons); 7 | void handle_mouse_evt(int mouse_evt_id, int pos_y, int pos_x); 8 | 9 | private: 10 | bool mouse_down = false; 11 | bool mouse_left = false; 12 | int last_mouse_y; 13 | }; 14 | -------------------------------------------------------------------------------- /src/rust_games/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust_games" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | libc = "0.2.155" 8 | rand = "0.8" 9 | serde = { version = "1.0", features = ["derive"] } 10 | bincode = "1.3.3" 11 | lazy_static = "1.4" 12 | 13 | [lib] 14 | name = "alexgames_rust" 15 | path = "rust_game_handler.rs" 16 | crate-type = ["staticlib"] 17 | -------------------------------------------------------------------------------- /src/android/app/src/main/java/net/alexbarry/alexgames/popup/IAlexGamesPopupManager.java: -------------------------------------------------------------------------------- 1 | package net.alexbarry.alexgames.popup; 2 | 3 | public interface IAlexGamesPopupManager { 4 | interface Callback { 5 | void popup_button_clicked(String popup_id, int btn_id); 6 | } 7 | 8 | void set_callback(Callback callback); 9 | void show_popup(String popup_id, String title, String msg, String btns[]); 10 | } 11 | -------------------------------------------------------------------------------- /src/android/cp_games_assets.sh: -------------------------------------------------------------------------------- 1 | set -e 2 | set -u 3 | set -x 4 | 5 | 6 | mkdir -p src/android/app/src/main/assets/games/preload/ 7 | cp -r src/lua_scripts/* src/android/app/src/main/assets/games/preload/ 8 | cp -r img/ src/android/app/src/main/assets/games/ 9 | 10 | mkdir -p src/android/app/src/main/assets/html 11 | cp -r build/wasm/out/http_out/* src/android/app/src/main/assets/html/ 12 | cp -r out/words-en.txt src/android/app/src/main/assets/ 13 | -------------------------------------------------------------------------------- /src/lua_scripts/libs/shuffle.lua: -------------------------------------------------------------------------------- 1 | local shuffle = {} 2 | 3 | local function swap(array, index1, index2) 4 | array[index1], array[index2] = array[index2], array[index1] 5 | end 6 | 7 | function shuffle.shuffle(array) 8 | local counter = #array 9 | while counter > 1 do 10 | local index = math.random(counter) 11 | swap(array, index, counter) 12 | counter = counter - 1 13 | end 14 | end 15 | 16 | return shuffle 17 | -------------------------------------------------------------------------------- /src/lua_api/lua_api_utils.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float lua_get_int_or_float_func(void *L, int stack_idx, const char *field_name, bool nil_ok, const char *func_name); 4 | 5 | #define lua_get_int_or_float(L, stack_idx, field_name) \ 6 | lua_get_int_or_float_func(L, stack_idx, field_name, false, __func__) 7 | 8 | #define lua_get_int_or_float_or_nil(L, stack_idx, field_name) \ 9 | lua_get_int_or_float_func(L, stack_idx, field_name, true, __func__) 10 | -------------------------------------------------------------------------------- /src/html/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AlexGames", 3 | "short_name": "AlexGames", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "description": "Play simple games in your browser, alone, with friends on the same device, or with friends over the internet by sharing a link with them.", 7 | "background_color": "#000", 8 | "icons": [ 9 | { 10 | "src": "icon/logo.png", 11 | "sizes": "any" 12 | } 13 | ], 14 | "splash_pages": null 15 | } 16 | -------------------------------------------------------------------------------- /src/lua_scripts/libs/cards/cards_set.lua: -------------------------------------------------------------------------------- 1 | local cards_set = {} 2 | 3 | local cards = require("libs/cards/cards") 4 | 5 | function cards_set.card_list_to_set(card_list) 6 | local card_set = { 7 | suits = {}, 8 | list = card_list, 9 | } 10 | for _, suit in ipairs(cards.suits) do 11 | card_set.suits[suit] = {} 12 | end 13 | 14 | for _, card in ipairs(card_list) do 15 | card_set.suits[card.suit][card.val] = true 16 | end 17 | 18 | return card_set 19 | end 20 | -------------------------------------------------------------------------------- /src/lua_scripts/games/crossword_letters/list_right_diffs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import sys 3 | 4 | 5 | fname1 = sys.argv[1] 6 | fname2 = sys.argv[2] 7 | 8 | words1 = set() 9 | with open(fname1, 'r') as f: 10 | for line in f: 11 | word = line.strip() 12 | words1.add(word) 13 | 14 | print('Words in %s that are not present in %s:' % (fname2, fname1)) 15 | with open(fname2, 'r') as f: 16 | for line in f: 17 | word = line.strip() 18 | if word not in words1: 19 | print(word) 20 | -------------------------------------------------------------------------------- /docker/ws_server/Dockerfile: -------------------------------------------------------------------------------- 1 | # TODO have the ws and http server inherit from a common image 2 | # to avoid duplicating so many dependencies 3 | FROM nginx:latest 4 | 5 | RUN apt-get update && apt-get install -y \ 6 | python3 \ 7 | python3-pip \ 8 | pipx 9 | 10 | RUN python3 -m venv /alexgames_python_venv 11 | ENV PATH="/alexgames_python_venv/bin:$PATH" 12 | 13 | RUN pip3 install websockets 14 | 15 | 16 | WORKDIR /app 17 | COPY . . 18 | ENTRYPOINT [ "python3", "src/server/ws/ws_server.py" ] 19 | -------------------------------------------------------------------------------- /src/html/js/collapsable.js: -------------------------------------------------------------------------------- 1 | 2 | function init_collapsables() { 3 | console.debug("init_collapsables"); 4 | let elems = document.getElementsByClassName("collapsable"); 5 | for (let elem of elems) { 6 | elem.addEventListener('click', (e) => { 7 | console.debug("elem", elem, "clicked, toggling collapsable"); 8 | if (elem.classList.contains("collapsed")) { 9 | elem.classList.remove("collapsed"); 10 | } else { 11 | elem.classList.add("collapsed"); 12 | } 13 | }); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tests/saved_state/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(SRC_DIR ../../src) 2 | 3 | # TODO remove this 4 | add_definitions(-DROOT_DIR="\\"\\"") 5 | 6 | add_subdirectory("${SRC_DIR}/" out/alexgames_core) 7 | 8 | add_executable(test_saved_state 9 | test_saved_state_db.cpp) 10 | target_link_libraries(test_saved_state PRIVATE alexgames_core) 11 | target_include_directories(test_saved_state PUBLIC 12 | ${SRC_DIR}/game_api 13 | ${SRC_DIR}/cpp_libs/game_api_helper) 14 | -------------------------------------------------------------------------------- /src/android/app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /src/cpp_libs/sqlite_saved_state/sqlite_saved_state.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | void *init_sqlite_saved_state(const char *fname); 8 | int set_value(void *handle, const char *key, 9 | const uint8_t *value, size_t value_len); 10 | int get_value(void *handle, const char *key, 11 | uint8_t *value_out, size_t max_value_len); 12 | void destroy_sqlite_saved_state(void *handle); 13 | 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | -------------------------------------------------------------------------------- /src/rust_games/rust_game_api.h: -------------------------------------------------------------------------------- 1 | #ifndef RUST_GAME_API_H_ 2 | #define RUST_GAME_API_H_ 3 | 4 | #include "game_api.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | bool rust_game_supported(const char *game_str, size_t game_str_len); 11 | 12 | void *start_rust_game(const char *game_str, size_t game_str_len, const struct game_api_callbacks *callbacks); 13 | 14 | const struct game_api * get_rust_api(void); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | 20 | 21 | #endif /* ifndef GAME_API_H_ */ 22 | -------------------------------------------------------------------------------- /src/cpp_libs/utils/str_eq_literal.h: -------------------------------------------------------------------------------- 1 | // #include 2 | 3 | // The idea is that you can do 4 | // str_eq_literal(arg, "some_str", arg_len) 5 | // and: 6 | // * will stop searching if arg does not contain a null 7 | // * will not match "some" (note strncmp("some", "some_str", len("some")) would match) 8 | // * will even fail if arg contains extra null characters, e.g. "some_str\x00\x00\x00\x00" 9 | #define str_eq_literal(arg, literal, n) \ 10 | ((n == sizeof(literal)-1) && memcmp(arg, literal, sizeof(literal)) == 0) 11 | -------------------------------------------------------------------------------- /src/dictionary/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(dict_inputs build_word_list_w_freq.py wip/vulgar_or_weird_words.txt) 2 | set(dict_output ${CMAKE_SOURCE_DIR}/../out/words-en.txt) 3 | 4 | add_custom_command( 5 | OUTPUT ${dict_output} 6 | COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --cyan "Generating words-en.txt" 7 | COMMAND python3 ${PROJECT_ROOT}/src/dictionary/build_word_list_w_freq.py 8 | WORKING_DIRECTORY ${PROJECT_ROOT} 9 | DEPENDS ${dict_inputs} 10 | ) 11 | 12 | add_custom_target( 13 | generate_dict_file ALL 14 | DEPENDS ${dict_output} 15 | ) 16 | -------------------------------------------------------------------------------- /src/android/app/src/main/res/layout/fragment_local_client_web_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(SRC_DIR "../src") 2 | 3 | add_definitions(-DROOT_DIR=\\"\\") 4 | 5 | add_subdirectory("${SRC_DIR}/" out/alexgames_core) 6 | 7 | add_executable(test_varint 8 | utils/test_varint.cpp) 9 | target_include_directories(test_varint PRIVATE "${SRC_DIR}/cpp_libs/utils") 10 | target_link_libraries(test_varint PRIVATE alexgames_varint) 11 | 12 | add_executable(test_utf8 13 | utils/test_utf8_decode.cpp) 14 | target_include_directories(test_utf8 PRIVATE "${SRC_DIR}/cpp_libs/utils") 15 | target_link_libraries(test_utf8 PRIVATE alexgames_utf8) 16 | -------------------------------------------------------------------------------- /src/cpp_libs/touch_scroll_handler/touch_scroll_handler.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "game_api.h" 4 | 5 | struct TouchScrollHandlerPoint { 6 | double y; 7 | double x; 8 | }; 9 | 10 | class TouchScrollHandler { 11 | public: 12 | struct TouchScrollHandlerPoint handle_touch_evt(const char *evt_id_str, int evt_id_str_len, 13 | void *changed_touches, int changed_touches_len); 14 | 15 | private: 16 | bool active_touch_present = false; 17 | touch_id_t active_touch; 18 | double prev_touch_screen_y_pos; 19 | double prev_touch_screen_x_pos; 20 | 21 | }; 22 | -------------------------------------------------------------------------------- /src/dictionary/dictionary.h: -------------------------------------------------------------------------------- 1 | //typedef int (*create_word_table_t )(void *handle); 2 | typedef int (*add_word_to_list_func_t)(void *handle, int row_idx, int argc, const unsigned char **argv); 3 | //typedef int (*word_table_done_t )(void *handle); 4 | 5 | struct word_callback_data { 6 | void *handle; 7 | //create_word_table_t create_word_table; 8 | add_word_to_list_func_t add_word_to_list_func; 9 | //word_table_done_t word_table_done; 10 | }; 11 | 12 | void *init_dict(); 13 | void get_words(void *dict_handle, const char *query, struct word_callback_data *data); 14 | void teardown_dict(void *dict_handle); 15 | -------------------------------------------------------------------------------- /src/rust_games/libs/point.rs: -------------------------------------------------------------------------------- 1 | #[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)] 2 | pub struct Pt { 3 | pub x: i32, 4 | pub y: i32, 5 | } 6 | 7 | impl Pt { 8 | pub fn add(&self, arg: Pt) -> Pt { 9 | Pt { 10 | y: self.y + arg.y, 11 | x: self.x + arg.x, 12 | } 13 | } 14 | 15 | pub fn mult(&self, arg: i32) -> Pt { 16 | Pt { 17 | y: self.y * arg, 18 | x: self.x * arg, 19 | } 20 | } 21 | 22 | pub fn swap(&self) -> Pt { 23 | Pt { 24 | y: self.x, 25 | x: self.y, 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | services: 3 | http_build_wasm: 4 | build: 5 | context: . 6 | dockerfile: docker/http_server/Dockerfile.build_wasm 7 | volumes: 8 | - ./:/app 9 | http_serve: 10 | image: nginx:latest 11 | volumes: 12 | - ./build/wasm/out/http_out:/usr/share/nginx/html 13 | ports: 14 | - "1234:80" 15 | depends_on: 16 | - http_build_wasm 17 | ws_server: 18 | build: 19 | context: . 20 | dockerfile: docker/ws_server/Dockerfile 21 | ports: 22 | - "55433:55433" 23 | -------------------------------------------------------------------------------- /src/android/.idea/deploymentTargetDropDown.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/android/app/src/main/res/drawable/ic_stop.xml: -------------------------------------------------------------------------------- 1 | 7 | 15 | 16 | -------------------------------------------------------------------------------- /src/android/app/src/main/java/net/alexbarry/alexgames/util/StringFuncs.java: -------------------------------------------------------------------------------- 1 | package net.alexbarry.alexgames.util; 2 | 3 | public class StringFuncs { 4 | public static String byteary_to_nice_str(byte[] ary, int msg_len) { 5 | StringBuilder stringBuilder = new StringBuilder(); 6 | stringBuilder.append("["); 7 | for (int i=0; i= msg_len) { break; } 9 | if (i != 0) { stringBuilder.append(","); } 10 | stringBuilder.append(String.format(" %02x", ary[i])); 11 | } 12 | stringBuilder.append("]"); 13 | return stringBuilder.toString(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/cpp_libs/touch_press_handler/touch_press_handler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "game_api.h" 3 | 4 | #include 5 | 6 | class TouchPress { 7 | public: 8 | static TouchPress NoTouch(); 9 | static TouchPress Touch(float y, float x); 10 | bool pressed; 11 | float y; 12 | float x; 13 | }; 14 | 15 | class TouchPressHandler { 16 | public: 17 | TouchPress handle_touch_evt(std::string evt_id_str, 18 | const struct touch_info *changed_touches, 19 | int changed_touches_len); 20 | 21 | private: 22 | bool active_touch_present = false; 23 | struct touch_info active_touch; 24 | int max_touch_move = 20; 25 | }; 26 | -------------------------------------------------------------------------------- /src/android/app/src/main/res/navigation/server_monitoring_nav_graph.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /src/cpp_libs/saved_state_db/saved_state_db_c_api.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include "game_api.h" 8 | 9 | void *saved_state_db_init(void *L, const struct game_api_callbacks *callbacks); 10 | void saved_state_db_save_state(void *handle, const char *game_id, int session_id, const uint8_t *state, size_t state_len); 11 | int saved_state_db_get_new_session_id(void *handle); 12 | int saved_state_db_get_last_session_id(void *handle, const char *game_id); 13 | bool saved_state_db_has_saved_state_offset(void *handle, int session_id, int move_id_offset); 14 | int saved_state_db_get_saved_state_offset(void *handle, int session_id, int move_id_offset, uint8_t *state, size_t state_len); 15 | 16 | 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | -------------------------------------------------------------------------------- /src/server/socket/test/test_client.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "socket_server.h" 4 | 5 | static const int port = 5678; 6 | 7 | int main(void) { 8 | void *handle; 9 | printf("Connecting to server on port %d\n", port); 10 | int rc = join_server("127.0.0.1", port, &handle); 11 | 12 | if (rc != 0) { 13 | printf("Unable to join server, rc=%d\n", rc); 14 | return -1; 15 | } 16 | 17 | char buff[1024]; 18 | size_t bytes_recvd = 0; 19 | recv_msg(handle, sizeof(buff), buff, &bytes_recvd); 20 | 21 | printf("Recvd msg from server: %.*s\n", bytes_recvd, buff); 22 | 23 | for (int i=0; i<10; i++) { 24 | int msg_len = snprintf(buff, sizeof(buff), "Hello from client msg %d", i); 25 | send_msg(handle, buff, msg_len); 26 | sleep(1); 27 | } 28 | 29 | return 0; 30 | } 31 | -------------------------------------------------------------------------------- /src/html/css/style_collapsable.css: -------------------------------------------------------------------------------- 1 | .collapsable:hover, .toggle_collapsable_btn:hover { 2 | cursor: pointer; 3 | } 4 | 5 | .toggle_collapsable_btn { 6 | text-decoration: underline; 7 | } 8 | 9 | .toggle_collapsable_btn.content_collapsed:before { 10 | content: "(Expand)" 11 | } 12 | .toggle_collapsable_btn:not(.content_collapsed):before { 13 | content: "(Collapse)" 14 | } 15 | 16 | .collapsed { 17 | display: inline-block; 18 | inline-size: 400px; 19 | word-break: break-all; 20 | overflow-inline: hidden; 21 | white-space: nowrap; 22 | text-overflow: ellipsis; 23 | color: #888888; 24 | overflow: hidden; 25 | } 26 | 27 | /* TODO not sure how to make this work */ 28 | .collapsed:after { 29 | content: 'Click to expand'; 30 | } 31 | 32 | .toggle_collapsable.collapsed { 33 | display: none; 34 | } 35 | -------------------------------------------------------------------------------- /src/android/app/src/main/java/net/alexbarry/alexgames/graphics/IAlexGamesCanvas.java: -------------------------------------------------------------------------------- 1 | package net.alexbarry.alexgames.graphics; 2 | 3 | public interface IAlexGamesCanvas { 4 | void draw_graphic(String img_id, int y, int x, int width, int height, int angle_degrees); 5 | void draw_line(String colour, int line_size, int y1, int x1, int y2, int x2); 6 | void draw_text(String text, String colour, int y, int x, int size, int align); 7 | 8 | void draw_rect(String colour, int y_start, int x_start, int y_end, int x_end); 9 | 10 | void draw_circle(String fill_colour, String outline_colour, int y, int x, int radius); 11 | 12 | void draw_clear(); 13 | 14 | float getScale(); 15 | 16 | // TODO remove 17 | boolean post(Runnable r); 18 | 19 | void draw_refresh(); 20 | } 21 | -------------------------------------------------------------------------------- /src/android/app/src/main/java/net/alexbarry/alexgames/AlexGamesViewModel.java: -------------------------------------------------------------------------------- 1 | package net.alexbarry.alexgames; 2 | 3 | import androidx.lifecycle.LiveData; 4 | import androidx.lifecycle.MutableLiveData; 5 | import androidx.lifecycle.ViewModel; 6 | 7 | public class AlexGamesViewModel extends ViewModel { 8 | private MutableLiveData game_selected; 9 | 10 | public void setGameId(String game_id) { 11 | if (game_selected == null) { 12 | game_selected = new MutableLiveData<>(); 13 | } 14 | game_selected.setValue(game_id); 15 | } 16 | 17 | public String getGameId() { 18 | if (game_selected != null) { 19 | return game_selected.getValue(); 20 | } else { 21 | return "minesweeper"; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/lua_api/lua_api.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #ifndef LUA_API_H_ 7 | #define LUA_API_H_ 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #include "game_api.h" 14 | 15 | #define UPLOADED_GAME_MAIN_FILE "game.lua" 16 | 17 | extern const struct game_api lua_game_api; 18 | void *start_lua_game(const struct game_api_callbacks *api_callbacks, const char *game_path); 19 | 20 | // TODO maybe remove this one? 21 | void *init_lua_game(const struct game_api_callbacks *api_callbacks_arg, 22 | const char *lua_fpath); 23 | void destroy_lua_game(void *L); 24 | 25 | const char *get_lua_game_path(const char *game_id, size_t game_id_len); 26 | 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | 33 | #endif /* LUA_API_H_ */ 34 | -------------------------------------------------------------------------------- /src/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | 5 | repositories { 6 | google() 7 | jcenter() 8 | 9 | } 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:7.4.2' 12 | classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10' 13 | 14 | 15 | // NOTE: Do not place your application dependencies here; they belong 16 | // in the individual module build.gradle files 17 | } 18 | } 19 | 20 | allprojects { 21 | repositories { 22 | google() 23 | jcenter() 24 | mavenCentral() 25 | 26 | } 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /tests/go/go_tests.lua: -------------------------------------------------------------------------------- 1 | go = require("src/lua_scripts/games/go/go") 2 | 3 | -- A game that Sabrina and I played on 2021-05-11 4 | -- my understanding is that I (1) control 46 territory and she (2) controls 35. 5 | -- It seems non trivial to determine this though. 6 | -- Maybe in our game it is fairly simple, we only have a few 7 | -- groups of points in each other's territory, and all of those ones 8 | -- have limited liberties that could probably be rulled out programatically. 9 | board = { 10 | {1, 1, 1, 1, 1, 1, 0, 1, 0}, 11 | {2, 1, 2, 1, 2, 1, 2, 1, 0}, 12 | {2, 2, 2, 2, 2, 1, 1, 1, 0}, 13 | {2, 1, 0, 2, 2, 2, 1, 0, 1}, 14 | {1, 1, 1, 2, 1, 1, 1, 1, 1}, 15 | {2, 1, 0, 2, 1, 0, 1, 0, 1}, 16 | {2, 2, 2, 2, 1, 0, 1, 0, 0}, 17 | {0, 2, 0, 2, 2, 1, 1, 0, 2}, 18 | {2, 0, 2, 2, 1, 1, 1, 1, 1}, 19 | } 20 | 21 | go.print_board(board) 22 | -------------------------------------------------------------------------------- /src/android/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 19 | 20 | -------------------------------------------------------------------------------- /src/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 15 | 16 |