Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial scaffolding for FE work #47

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions resources/gaming-fe/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
40 changes: 40 additions & 0 deletions resources/gaming-fe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Cal Poker Game

## **Introduction**

Cal Poker is a simple real-time poker game where two players can connect, place wagers, and play turns against each other. The game uses Socket.IO for real-time communication between clients and the server.

## **Features**

- Real-time multiplayer gameplay
- Simple betting system
- Turn-based actions
- Interactive UI with Material-UI components
- Modular and maintainable codebase

## **Prerequisites**

- **Node.js**
- **npm**
- **TypeScript**

## **Setup**

1. **Install dependencies for the client:**
```npm install```

2. **Starting the Server:**
```node server.js```

3. **Start the React application:**
```npm start```

The client will start on port 3000 by default and should open automatically in your default browser.

## **Usage**
Open two browser windows or tabs:

Go to http://localhost:3000 in both.
Enter a wager amount and find an opponent:

In both windows, enter a wager amount (e.g., 50) and click "Find an opponent".
7 changes: 7 additions & 0 deletions resources/gaming-fe/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
preset: "ts-jest",
testEnvironment: "jsdom",
moduleNameMapper: {
"^socket.io-client$": "<rootDir>/__mocks__/socket.io-client.ts",
},
};
Loading
Loading