Running Services Locally #
Recommended Read For a general overview of our infrastructure please see Overall Infrastructure.
For more in-depth information on running these servers locally please see Running Uni/UWAPI/Classic/Puzzles/One Servers Locally made by members Robert Shi and Cameron Cheung.
GamesmanPy #
GamesmanPy is our most recent addition to our backend lineup of solvers. Started by member Michael Setchko Palmerlee, GamesmanPy allows the solving of small games and puzzles in python; easing complexity for new members in the onboarding process.
Cloning the Repository #
git clone https://github.com/GamesCrafters/GamesmanPy.git
Setup the Project #
Please follow the README.md instructions in the
GitHub Repository for GamesmanPy.
Running the Server #
In the root project directory GamesmanPy/ run
uv run server
Sending Requests #
To send requests to your local server, you can either input a url from a valid API route into the address bar of your browser, or, run curl -L <url> from the terminal.
Please see GamesmanPy’s valid routes in
~/server/src/server/server.py.
Example Requests #
/<game_id>/<variant_id>/start/
Shows the starting position for the game clobber (game_id) variant 3x4 (variant_id).
Shows the starting position for the game horses variant regular.
/<game_id>/<variant_id>/positions/?p=<position>
Shows the position information and available moves for position oxoxoxoxoxoxo for the game clobber variant 3x4.
GamesCraftersUWAPI #
Cloning the Repository #
git clone https://github.com/GamesCrafters/GamesCraftersUWAPI
cd GamesCraftersUWAPI
pip install -r requirements.txt
Setup the Project #
Please follow the README.md instructions in the
GitHub Repository for GamesCraftersUWAPI.
Running the Server #
In the root project directory GamesCraftersUWAPI/ run
python3 server.py
Sending Requests #
To send requests to your local server, you can either input a url from a valid API route into the address bar of your browser, or, run curl -L <url> from the terminal.
Please see GamesCrafersUWAPI valid routes in the
README.md.
Example Requests #
/
Shows the list of available games and puzzles registered in UWAPI’s
GamesCraftersUWAPI/games/__init__.py file.
/<game_id>/
Shows game information for the game achi (game_id).
/<game_id>/<variant_id>/
Shows variant information for variant regular (game_id) of game othello.
/<game_id>/<variant_id>/positions/?p=<human_readable_position_string>/
Shows position information for position 00000000_9 for the puzzle sevenpennies variant regular.
GamesmanUni #
Cloning the Repository #
git clone https://github.com/GamesCrafters/GamesmanUni.git
Setup the Project #
Please follow the README.md instructions in the
GitHub Repository for GamesmanUni.
Running the Hot Module Replacement (HMR) Server #
In the root project directory GamesmanUni/ run
yarn dev
Access the Local Server #
See your GamesmanUni server at http://localhost:4173/uni.
Connect GamesmanUni to your local UWAPI #
To make GamesmanUni point to your local UWAPI instance, modify
GamesmanUni/src/models/datas/defaultApp.ts such that it matches the following code block:
export const defaultDataSources: Types.DataSources = {
gitHubRepositoryAPI: "https://api.github.com/repos/GamesCrafters/GamesmanUni",
//gameAPI: "https://nyc.cs.berkeley.edu/universal/v1/"
gameAPI: "http://localhost:8082/"
};