Online multiplayer in-browser implementation of the notorious German drinking game Busfahrer.
pnpm install
Note: The backend will not be able to serve the frontend.
pnpm serve
pnpm watch-client
pnpm watch-server
pnpm lint
pnpm lint-client
pnpm lint-server
pnpm build
pnpm build-client
pnpm build-server
pnpm start
Server accepts following arguments:
Argument | Type | Description | Default value | Example usage |
---|---|---|---|---|
port |
number |
Port on which the server listens. | 1337 |
pnpm start -- --port 3000 |
log |
boolean |
Whether to keep a log file (./busfahrer.log ) or not. |
false |
pnpm start -- --log |
- Production:
pnpm start
- Development:
pnpm watch-server
Event | Description | Parameters |
---|---|---|
setPlayer |
Set the player ID and name. (mandatory for the following events) | player: Player |
createRoom |
Create a room with a name. | roomName: string, callback?: (room: Room) => void |
joinRoom |
Join a room by its ID. | roomId: string, callback?: (room: Room) => void |
leaveRoom |
Leave a room by its ID. | roomId: string, callback?: (room: Room) => void |
startGame |
Start the game in a room. (player needs to be owner of the room) | roomId: string, callback?: (playingCard: PlayingCard) => void |
disconnect |
Client disconnected. (automatically fired by Socket.IO) | --- |
Event | Description | Parameters |
---|---|---|
playerJoinedRoom |
A player joined the room. | player: Player |
playerLeftRoom |
A player left the room. | player: Player |
roomRemoved |
The room was removed. | --- |
dealtHand |
The dealt hand for the player. | hand: PlayingCard[] |
flippedFirCard |
The flipped fir card. | firCard: PlayingCard |
- Custom "Busfahrer" logo by Hamzah Qazi (hqxdesigns / Souel Studios)
- Free SVG playing cards by Adrian Kennard (RevK®)