A small project to partially implement a boardgame with a React app for practice.
- TypeScript 93.8%
- CSS 5.9%
- Dockerfile 0.2%
- HTML 0.1%
| .github/workflows | ~: Bump oxfmt and Move .oxfmtrc.json to top level | |
| app | 21: Make unaffordable cards uninteractible in the hand | |
| assets | ~: Add screenshot to the README | |
| server | 20: Store gamestate and send to new clients | |
| .dockerignore | 19: Set up docker container deployment | |
| .gitignore | 19: Add github workflow to deploy to pages | |
| .oxfmtrc.json | ~: Bump oxfmt and Move .oxfmtrc.json to top level | |
| .oxlintrc.json | ~: Resolve lint warnings and update TODOs | |
| bun.lock | ~: Update dependencies | |
| Dockerfile | 19: Set up docker container deployment | |
| package.json | ~: Update dependencies | |
| README.md | ~: Bump oxfmt and Move .oxfmtrc.json to top level | |
Wartoad
Wartoad is a card game about seizing control of the pond!
Upgrade leaves floating on the pond, deploy units, and use them to capture your opponent's home leaf to win.
A screenshot of Wartoad being played from the perspective of a blue 'South' player. A sidebar shows hands of cards belonging to the South player and their red 'North' opponent. The main play area has a grid of red and blue zones, each with cards on them. Some cards are face down, but face up 'LilyPads' and 'Froglets' are also visible.This is a toy project based on Wartide for coding practice.
App
The app directory contains the frontend code for the game. It uses the following directory structure.
app/src:
types: basic types -- only uses type imports only from the same directorystate-types: types and constants for store/context state and convenience functions for operating on those typesview: React components which import no other components and don't use context or statestate: state to be provided by store/contextactions: action and/or reducer functions for modifying store/context statecontext: React contexts and relevant custom hooks, for direct use in any componentbasic: React components which import only components from src/view and may use context and/or statecomposite: React components which import some other components
Files in later directories may only import from earlier ones. Also:
src/state/gameimports all the other state filessrc/action/gameimports all the other action files- Files in
src/compositemay import eachother for now. - Files in
src/typesmay type-import eachother for now. Game.tsxcomposes all components of the game. It is presentational/structural.App.tsxprovides top level context and state forGame.tsx,which it imports. It is an entrypoint and provides wiring but should have minimal logic.- In other subdirectories, files of the same directory may not import eachother.