diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c4682cc..d72abf0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - node-version: [16] + node-version: [18] steps: - uses: actions/checkout@v3 @@ -29,7 +29,7 @@ jobs: - name: Build run: yarn workspace @kenrick95/c4-browser run build-gh-pages - name: Deploy - uses: JamesIves/github-pages-deploy-action@v4.2.5 + uses: JamesIves/github-pages-deploy-action@v4.4.1 with: branch: gh-pages folder: browser/dist diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 31015a2..cce44ae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - node-version: [16] + node-version: [18] steps: - uses: actions/checkout@v3 @@ -27,4 +27,4 @@ jobs: - name: Run Tests run: yarn workspaces foreach --verbose run test - name: Run Builds - run: yarn workspaces foreach --verbose run build + run: yarn workspaces foreach --verbose --topological run build diff --git a/Dockerfile b/Dockerfile index b616d97..c90d27e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16-alpine +FROM node:18-alpine WORKDIR /usr/src/app COPY .yarn .yarn/ diff --git a/README.md b/README.md index 685e40a..725ac33 100644 --- a/README.md +++ b/README.md @@ -1,43 +1,54 @@ -c4 -== +# c4 -![Test](https://github.com/kenrick95/c4/workflows/Test/badge.svg) +![Test](https://github.com/kenrick95/c4/workflows/Test/badge.svg) ![Deploy](https://github.com/kenrick95/c4/workflows/Deploy/badge.svg) **c4**, stands for **Connect Four**, is a browser game written in TypeScript and utilizes HTML's `canvas`. Player is playing against an AI that uses Minimax algorithm and alpha-beta pruning. The evaluation function is hard-coded, and hence the AI may not be moving using the most optimal move. ## Play -* [kenrick95.github.io/c4](https://kenrick95.github.io/c4/) + +- [kenrick95.github.io/c4](https://kenrick95.github.io/c4/) ## Gameplay + ### Objective -*Connect four* of your game pieces vertically, horizontally, or diagonally before the other player do so. + +_Connect four_ of your game pieces vertically, horizontally, or diagonally before the other player do so. ### How to move? + At each turn, player will drop a game piece in one of the seven columns by clicking on the chosen column. ### More info + Read [Wikipedia page on Connect Four](https://en.wikipedia.org/wiki/Connect_Four) ## Browser compatibility -- Should be good in latest Firefox, Edge, Chrome, Opera, Safari, and IE. + +Should be good in latest Firefox, Edge, Chrome, and Safari. ## Contributing + Contributions are welcome! I'm happy to accept any kind of contributions, pull requests, or bug reports. ### Developing 1. Fork and clone this repository 2. Install dependencies - ``` - yarn install - ``` + +``` +yarn install +``` + 3. Start local development server - ``` - yarn start - ``` + +``` +yarn start +``` + 4. Make your changes at either `browser/`, `core/`, or `server/` -5. Test it out at http://localhost:1234/ +5. Test it out at http://localhost:5173/ 6. After you are happy with your changes, please submit your Pull Request! ## License + This work is licensed under MIT License. diff --git a/browser/src/index.html b/browser/index.html similarity index 97% rename from browser/src/index.html rename to browser/index.html index 4951f96..f8c852c 100644 --- a/browser/src/index.html +++ b/browser/index.html @@ -73,6 +73,6 @@