Skip to content

A bataille (war) card game implemented using React and XState

Notifications You must be signed in to change notification settings

amessinger/bataille

Repository files navigation

Bataille Card Game

Should you want to "play" this game, head over to https://bataille.netlify.app

Game rules: https://en.wikipedia.org/wiki/War_(card_game)

Tech demo using XState and React.

The finite state machine code can be found in the machine folder and the react app code can be found in the app folder.

Prerequisites

Setup

Run yarn in a terminal in this folder.

Run

Run yarn web in a terminal in this folder.

The application is served on http://localhost:9000

The interface is quite barebone for now.

App interface

Should you care to allow popups on this page, a new tab allowing you to visualize the state machine live will open!

A live view of the state machine

Notes

If you're using VS Code and the remote container extension, a dev container is available.

Production

Run yarn build in a terminal in this folder.