From df75aa721e89c8c5798fc53e9404413b1ade8106 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Sun, 9 May 2021 18:28:37 +0000 Subject: Update README.md --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9f8f7e8..7b2c48a 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ # BSX -The card game BS, but better! Currently under development. +The card game BS, but better! -## Production deployment - -Edit the environmental variables in `./env` and use the script `./run`. +## Getting started +`git clone` this repository, then run `npm install` in `front` and `back`. You may have to run it multiple times for it to pull in all dependencies. ## Developing -You can use `NEXT_PUBLIC_BACK_HOST=localhost:4000 npm run dev` to run the frontend and `PORT=4000 node dist/index.js` to run the backend after building it with `npm run build`. +You can use `NEXT_PUBLIC_BACK_HOST=localhost:4000 npm run dev` to run the frontend and `PORT=4000 node dist/index.js` to run the backend after building it with `npm run build`. You could also just run `NEXT_PUBLIC_BACK_HOST='https://server.exozy.me' npm run dev` if you are only developing the frontend and connect to the public backend server. + +## Production deployment +Edit the environmental variables in `./env` and use the script `./run`. -- cgit v1.2.3-70-g09d2 From 45dd3cb2efd7d6549b37797c9bf0a2cf879b65c8 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Sun, 9 May 2021 18:32:47 +0000 Subject: Fix another bug --- back/src/Game.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/src/Game.ts b/back/src/Game.ts index e7e69ac..816754b 100644 --- a/back/src/Game.ts +++ b/back/src/Game.ts @@ -110,11 +110,11 @@ export default class Game { } while (this.lastPlayed > 0) { // Phase 2 await this.flip(); - this.lastPlayed--; if (this.phase === 3 as number) { // Oops, flipped over a red card! await this.giveup(); // The player who called BS won and now the challenged player must give up a card! return; } + this.lastPlayed--; } this.phase = 3; await this.giveup(); // The player who called BS won and now they must give up a card! -- cgit v1.2.3-70-g09d2 From 40115b714df43d51073ba20c7292aed3f75dcb14 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Sun, 9 May 2021 18:57:45 +0000 Subject: Minor UI change --- front/pages/index.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/front/pages/index.tsx b/front/pages/index.tsx index 4c38f74..5605b71 100644 --- a/front/pages/index.tsx +++ b/front/pages/index.tsx @@ -18,9 +18,7 @@ interface GameState { const rankStrs = ['', 'A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K']; const suitChars = ['♣', '♦', '♥', '♠']; -const rules = `Welcome to BSX! - -There are only 5 simple rules! +const rules = `There are only 5 simple rules! 1. You will first be dealt 5 cards. @@ -88,6 +86,9 @@ export default function Game() { if (!loggedIn) { return ( <> +
Your cards:
+Your cards stack:
{gameState.cards.map((card, i) => (