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

Create rooms managment #4

Open
mit3r opened this issue Dec 14, 2024 · 0 comments
Open

Create rooms managment #4

mit3r opened this issue Dec 14, 2024 · 0 comments
Assignees
Labels
backend good first issue Good for newcomers

Comments

@mit3r
Copy link
Collaborator

mit3r commented Dec 14, 2024

make roomManager class and other required classes (Player, Room)
make web route to create new room and send code as response

Example

// RoomManager.tsx
class RoomManager {
    rooms: Room[] = [];
    // or
    rooms = new Map<string, Room>();
    
    create(): string {
        // generate new unique code
        // create room assign to this.rooms
        // return code
    }
}

// it will be our manager, routes have to use this instance of class
export const manager = new RoomManager()
// webRoutes.tsx

webRouter.get("/create", (req, res) => {
    // create new room
    // response with code of created room
})
@mit3r mit3r added backend good first issue Good for newcomers labels Dec 14, 2024
@adampawelka adampawelka self-assigned this Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants