diff --git a/README.md b/README.md index b47b81f..efa3ff3 100644 --- a/README.md +++ b/README.md @@ -15,4 +15,4 @@ We welcome feedback and suggestions: 1. **Provide Constructive Feedback**: Offer suggestions in a constructive and positive manner. 2. **Participate in Discussions**: Engage in discussions to help improve the project. -For more detailed information, please refer to the [full contribution guidelines](./docs/CONTRIBUTING.md). +For more detailed information, please refer to the [full contribution guidelines](./manual/CONTRIBUTING.md). diff --git a/docs/site/.nojekyll b/docs/.nojekyll similarity index 100% rename from docs/site/.nojekyll rename to docs/.nojekyll diff --git a/docs/site/assets/highlight.css b/docs/assets/highlight.css similarity index 100% rename from docs/site/assets/highlight.css rename to docs/assets/highlight.css diff --git a/docs/site/assets/icons.js b/docs/assets/icons.js similarity index 100% rename from docs/site/assets/icons.js rename to docs/assets/icons.js diff --git a/docs/site/assets/icons.svg b/docs/assets/icons.svg similarity index 100% rename from docs/site/assets/icons.svg rename to docs/assets/icons.svg diff --git a/docs/site/assets/main.js b/docs/assets/main.js similarity index 100% rename from docs/site/assets/main.js rename to docs/assets/main.js diff --git a/docs/site/assets/navigation.js b/docs/assets/navigation.js similarity index 100% rename from docs/site/assets/navigation.js rename to docs/assets/navigation.js diff --git a/docs/site/assets/search.js b/docs/assets/search.js similarity index 100% rename from docs/site/assets/search.js rename to docs/assets/search.js diff --git a/docs/site/assets/style.css b/docs/assets/style.css similarity index 100% rename from docs/site/assets/style.css rename to docs/assets/style.css diff --git a/docs/site/classes/models__base.BaseEventEmitter.html b/docs/classes/models__base.BaseEventEmitter.html similarity index 99% rename from docs/site/classes/models__base.BaseEventEmitter.html rename to docs/classes/models__base.BaseEventEmitter.html index c8fa716..c4af9bc 100644 --- a/docs/site/classes/models__base.BaseEventEmitter.html +++ b/docs/classes/models__base.BaseEventEmitter.html @@ -17,7 +17,7 @@
const casino = new BaseEventEmitter();
casino.on('casino:roomCreated', (room) => console.log(`Room created: ${room.name}`));
const room = casino.createRoom({ name: "Room1", tableSize: 6, smallBlind: 10, bigBlind: 20 });
console.log(room); // Logs details of "Room1"
-

Hierarchy (view full)

Implements

Constructors

Hierarchy (view full)

Implements

Constructors

Properties

Returns BaseEventEmitter

const casino = new BaseEventEmitter();
console.log(casino.getRooms()); // Output: []
-

Properties

captureRejections: boolean

Value: boolean

+

Properties

captureRejections: boolean

Value: boolean

Change the default captureRejections option on all new EventEmitter objects.

v13.4.0, v12.16.0

captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

@@ -126,7 +126,7 @@
  • event: {
        data: {
            [key: string]: any;
        };
        [key: string]: any;
    }
    • [key: string]: any
    • data: {
          [key: string]: any;
      }
      • [key: string]: any
  • Optionalmiddlewares?: ((event: BaseEventInterface<any>, next: (() => void)) => false | void)[]

Returns void

emitter.emitEvent("game:started", {
event: { data: { gameId: "001", status: "active" } },
middlewares: [
(event, next) => { console.log("Processing event:", event); next(); },
(event, next) => { event.data.processed = true; next(); }
]
});
-
  • Returns an array listing the events for which the emitter has registered +

  • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ]
    @@ -177,7 +177,7 @@

Returns void

emitter.emitEvent("game:started", {
event: { data: { gameId: "001", status: "active" } },
middlewares: [
(event, next) => { console.log("Processing event:", event); next(); },
(event, next) => { event.data.processed = true; next(); }
]
});
-
  • Alias for emitter.removeListener().

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v10.0.0

  • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already diff --git a/docs/site/classes/models_card.Card.html b/docs/classes/models_card.Card.html similarity index 97% rename from docs/site/classes/models_card.Card.html rename to docs/classes/models_card.Card.html index 85cc74d..a64a7a2 100644 --- a/docs/site/classes/models_card.Card.html +++ b/docs/classes/models_card.Card.html @@ -7,7 +7,7 @@

    const card = new Card(Rank.Ace, Suit.Spades);
    console.log(card.toString()); // "A of Spades"
    -

Implements

Constructors

Implements

Constructors

Methods

getRank getSuit toObj @@ -18,28 +18,28 @@

Returns Card

const card = new Card(Rank.Ace, Suit.Spades);
 
-

Methods

Methods

  • toObj

    Returns an object representation of the card, containing its rank and suit.

    Returns {
        rank: Rank;
        suit: Suit;
    }

    The card's rank and suit as an object.

    const cardObj = card.toObj();
    console.log(cardObj); // { rank: "A", suit: "Spades" }
    -
  • toString

    Returns a string representation of the card, displaying its rank and suit.

    Returns string

    The card's rank and suit as a formatted string.

    const description = card.toString();
    console.log(description); // "A of Spades"
    -
+
diff --git a/docs/site/classes/models_casino.Casino.html b/docs/classes/models_casino.Casino.html similarity index 99% rename from docs/site/classes/models_casino.Casino.html rename to docs/classes/models_casino.Casino.html index 5350fae..4c1ba28 100644 --- a/docs/site/classes/models_casino.Casino.html +++ b/docs/classes/models_casino.Casino.html @@ -14,7 +14,7 @@
const casino = new Casino();
casino.on('casino:roomCreated', (room) => console.log(`Room created: ${room.name}`));
const room = casino.createRoom({ name: "Room1", tableSize: 6, smallBlind: 10, bigBlind: 20 });
console.log(room); // Logs details of "Room1"
-

Hierarchy (view full)

Implements

Constructors

Hierarchy (view full)

Implements

Constructors

Properties

Returns Casino

const casino = new Casino();
console.log(casino.getRooms()); // Output: []
-

Properties

captureRejections: boolean

Value: boolean

+

Properties

captureRejections: boolean

Value: boolean

Change the default captureRejections option on all new EventEmitter objects.

v13.4.0, v12.16.0

captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

@@ -122,7 +122,7 @@
const casino = new Casino();
const room = new PokerRoom({ name: "HighRollers", tableSize: 6, smallBlind: 10, bigBlind: 20 });
const rooms = casino.addRoom(room);
console.log(rooms); // Updated rooms list with the new room
-
  • Adds multiple PokerRoom instances to the Casino's list of managed rooms.

    N/A

    N/A

    Enables efficient management of batch room additions within the Casino, ensuring all rooms are processed together.

    @@ -146,7 +146,7 @@
    const extendedCasino = new Casino();
    const rooms = [new PokerRoom({ name: "VIP Room", tableSize: 8, smallBlind: 50, bigBlind: 100 })];
    extendedCasino.addRooms(rooms); // Adds VIP rooms to the Casino
    -
  • Creates a new PokerRoom instance based on the provided configuration and adds it to the Casino's rooms list.

    N/A

    N/A

    Allows the Casino to dynamically create new rooms as needed by providing specific room configurations.

    @@ -168,7 +168,7 @@
    class SpecialCasino extends Casino {
    public createSpecialRoom(config: PokerRoomConfig): PokerRoomInterface {
    return this._createRoom(config);
    }
    }
    const specialCasino = new SpecialCasino();
    const newRoom = specialCasino.createSpecialRoom({ name: "Champions Lounge", tableSize: 10, smallBlind: 100, bigBlind: 200 });
    console.log(newRoom.getName()); // Outputs: "Champions Lounge"
    -
  • Removes a PokerRoom from the Casino's list based on the room's index, providing controlled removal of rooms.

    N/A

    N/A

    Allows for the safe removal of a specific room from the Casino’s list.

    @@ -192,7 +192,7 @@
    const casino = new Casino();
    const room = casino.createRoom({ name: "HighRollers", tableSize: 6, smallBlind: 10, bigBlind: 20 });
    const rooms = casino.deleteRoom(room);
    console.log(rooms); // Updated rooms list without the deleted room
    -
  • Sets the complete list of rooms managed by the Casino with a new array of PokerRoomInterface objects.

    N/A

    N/A

    This protected method allows subclasses of Casino to modify the entire __rooms property, which can be used @@ -218,7 +218,7 @@

    class ExtendedCasino extends Casino {
    public resetRooms(newRooms: PokerRoomInterface[]): PokerRoomInterface[] {
    return this._setRooms(newRooms);
    }
    }
    const extendedCasino = new ExtendedCasino();
    const rooms = [new PokerRoom({ name: "VIP", tableSize: 8, smallBlind: 50, bigBlind: 100 })];
    extendedCasino.resetRooms(rooms); // Resets the Casino's rooms list
    -
  • Alias for emitter.on(eventName, listener).

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v0.1.26

  • Adds a new PokerRoom instance to the Casino's list of managed rooms, enabling dynamic expansion of rooms within the Casino environment.

    @@ -244,7 +244,7 @@
    const casino = new Casino();
    const room = new PokerRoom({ name: "HighRollers", tableSize: 6, smallBlind: 10, bigBlind: 20 });
    const success = casino.addRoom(room);
    console.log(success); // true
    -
  • Adds multiple PokerRoom instances to the Casino's list of managed rooms in a single operation, enabling efficient and scalable room management.

    N/A

    N/A

    @@ -270,7 +270,7 @@
    const casino = new Casino();
    const rooms = [
    new PokerRoom({ name: "Room1", tableSize: 5, smallBlind: 5, bigBlind: 10 }),
    new PokerRoom({ name: "Room2", tableSize: 6, smallBlind: 10, bigBlind: 20 })
    ];
    const success = casino.addRooms(rooms);
    console.log(success); // true if both rooms were added successfully
    -
  • Creates a new PokerRoom within the Casino and adds it to the list of rooms.

    Implements the createRoom method of CasinoInterface.

    N/A

    Enables the dynamic creation and addition of a PokerRoom to the Casino, expanding the Casino’s managed rooms as required. @@ -297,7 +297,7 @@

    const casino = new Casino();
    const room = casino.createRoom({ name: "HighRollers", tableSize: 6, smallBlind: 10, bigBlind: 20 });
    console.log(casino.getRooms()); // Logs the new room within the array of rooms
    -
  • Removes a PokerRoom from the Casino's list of managed rooms based on the room's name, enabling dynamic contraction of the Casino environment as required.

    N/A

    N/A

    @@ -325,7 +325,7 @@
    const casino = new Casino();
    casino.createRoom({ name: "HighRollers", tableSize: 6, smallBlind: 10, bigBlind: 20 });
    const success = casino.deleteRoom("HighRollers");
    console.log(success); // true if room was found and removed, false otherwise
    -
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

    Returns true if the event had listeners, false otherwise.

    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener @@ -363,7 +363,7 @@
    • event: {
          data: {
              [key: string]: any;
          };
          [key: string]: any;
      }
      • [key: string]: any
      • data: {
            [key: string]: any;
        }
        • [key: string]: any
    • Optionalmiddlewares?: ((event: BaseEventInterface<any>, next: (() => void)) => false | void)[]

Returns void

emitter.emitEvent("game:started", {
event: { data: { gameId: "001", status: "active" } },
middlewares: [
(event, next) => { console.log("Processing event:", event); next(); },
(event, next) => { event.data.processed = true; next(); }
]
});
-
  • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ]
    @@ -398,7 +398,7 @@
    const casino = new Casino();
    const room = casino.getRoom(0); // Returns the first room or undefined if no rooms exist
    -
  • Retrieves the full list of rooms currently managed by the Casino.

    Implements the getRooms method of CasinoInterface.

    N/A

    Provides access to the Casino's list of rooms, allowing external components or systems to retrieve and display @@ -418,7 +418,7 @@

    const casino = new Casino();
    console.log(casino.getRooms()); // Output: []
    -
  • Checks if a provided index is within the valid range of the Casino’s room list, helping avoid out-of-bounds errors.

    isValidIndex method from CasinoInterface.

    N/A

    This method validates an index before it's used to access or modify a room in the Casino’s list, protecting @@ -446,7 +446,7 @@

    const casino = new Casino();
    try {
    casino.isValidIndex(2); // Returns true if there are at least 3 rooms
    } catch (error) {
    console.error(error.message); // If index 2 is out of bounds, logs error message
    }
    -
  • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      @@ -488,7 +488,7 @@

    Returns void

    emitter.emitEvent("game:started", {
    event: { data: { gameId: "001", status: "active" } },
    middlewares: [
    (event, next) => { console.log("Processing event:", event); next(); },
    (event, next) => { event.data.processed = true; next(); }
    ]
    });
    -
  • Alias for emitter.removeListener().

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v10.0.0

  • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already @@ -598,7 +598,7 @@

    const casino = new Casino();
    const count = casino.roomCount();
    console.log(count); // Console Output: 0 if no rooms exist, or the total count of rooms otherwise
    -
  • By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    @@ -634,7 +634,7 @@
    const casino = new Casino();
    const rooms: PokerRoomInterface[] = [
    new PokerRoom({ name: "Room1", tableSize: 6, smallBlind: 10, bigBlind: 20 })
    ];
    casino.setRooms(rooms);
    console.log(casino.getRooms()); // Logs an array with the newly set rooms
    -
  • Retrieves the total count of rooms managed by the Casino, enabling easy access to the room quantity.

    N/A - This method is unique to the Casino class and does not implement any other methods.

    N/A - This method does not override any superclass or parent methods.

    The size method provides a shortcut to access the number of poker rooms currently managed by the Casino. @@ -653,7 +653,7 @@

    const casino = new Casino();
    const count = casino.size();
    console.log(count); // Console Output: 0 if no rooms have been added
    -
  • Experimental

    Listens once to the abort event on the provided signal.

    +
  • Experimental

    Listens once to the abort event on the provided signal.

    Listening to the abort event on abort signals is unsafe and may lead to resource leaks since another third party with the signal can call e.stopImmediatePropagation(). Unfortunately Node.js cannot change diff --git a/docs/site/classes/models_deck.Deck.html b/docs/classes/models_deck.Deck.html similarity index 99% rename from docs/site/classes/models_deck.Deck.html rename to docs/classes/models_deck.Deck.html index 58612d1..5087174 100644 --- a/docs/site/classes/models_deck.Deck.html +++ b/docs/classes/models_deck.Deck.html @@ -6,7 +6,7 @@

    const deck = new Deck();
    deck.on('deck:shuffled', () => console.log('Deck has been shuffled.'));
    deck.shuffle();
    const card = deck.draw();
    console.log(card?.toString()); // "A of Spades"
    -

Hierarchy (view full)

Implements

Constructors

Hierarchy (view full)

Implements

Constructors

Properties

Returns Deck

const deck = new Deck();
 
-

Properties

captureRejections: boolean

Value: boolean

+

Properties

captureRejections: boolean

Value: boolean

Change the default captureRejections option on all new EventEmitter objects.

v13.4.0, v12.16.0

captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

@@ -90,7 +90,7 @@
const deck = new Deck();
const drawnCard = deck.draw();
console.log(drawnCard?.toString()); // "A of Spades"
-
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

    Returns true if the event had listeners, false otherwise.

    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener @@ -128,7 +128,7 @@
    • event: {
          data: {
              [key: string]: any;
          };
          [key: string]: any;
      }
      • [key: string]: any
      • data: {
            [key: string]: any;
        }
        • [key: string]: any
    • Optionalmiddlewares?: ((event: BaseEventInterface<any>, next: (() => void)) => false | void)[]

Returns void

emitter.emitEvent("game:started", {
event: { data: { gameId: "001", status: "active" } },
middlewares: [
(event, next) => { console.log("Processing event:", event); next(); },
(event, next) => { event.data.processed = true; next(); }
]
});
-
  • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ]
    @@ -140,7 +140,7 @@
    const cards = deck.getCards();
    console.log(cards.length); // 52 (before shuffling or drawing)
    -
  • Returns the number of listeners listening for the event named eventName. @@ -185,7 +185,7 @@

Returns void

emitter.emitEvent("game:started", {
event: { data: { gameId: "001", status: "active" } },
middlewares: [
(event, next) => { console.log("Processing event:", event); next(); },
(event, next) => { event.data.processed = true; next(); }
]
});
-
  • Alias for emitter.removeListener().

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v10.0.0

  • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already @@ -288,7 +288,7 @@

    Returns void

    const deck = new Deck();
    deck.shuffle();
    -
  • Experimental

    Listens once to the abort event on the provided signal.

    Listening to the abort event on abort signals is unsafe and may lead to resource leaks since another third party with the signal can call e.stopImmediatePropagation(). Unfortunately Node.js cannot change diff --git a/docs/site/classes/models_logger.Logger.html b/docs/classes/models_logger.Logger.html similarity index 98% rename from docs/site/classes/models_logger.Logger.html rename to docs/classes/models_logger.Logger.html index cd3d78b..6dd6f1e 100644 --- a/docs/site/classes/models_logger.Logger.html +++ b/docs/classes/models_logger.Logger.html @@ -18,7 +18,7 @@

    const logger = new Logger({ logDirPath: "./logs", enableConsoleLogging: true });
    logger.log(LogLevel.INFO, "Application started");
    -

Implements

Constructors

Implements

Returns Logger

const logger = new Logger({ logDirPath: "./logs", enableConsoleLogging: true });
// Logs will be saved in "./logs" directory and printed to the console.
-

Methods

  • The disableConsoleLogging method disables console logging for the Logger instance. When disabled, log +

Methods

  • The disableConsoleLogging method disables console logging for the Logger instance. When disabled, log entries are only written to log files and are no longer displayed in the console.

    This method provides a way to turn off console output of log messages, which is useful for reducing console clutter in production environments where log messages are typically directed only to log files.

    @@ -69,7 +69,7 @@
    // Disable console logging for production
    logger.disableConsoleLogging();
    logger.log(LogLevel.INFO, "Console logging disabled");
    -
  • The enableConsoleLogging method enables console logging for the Logger instance. When activated, all log +

  • The enableConsoleLogging method enables console logging for the Logger instance. When activated, all log entries are displayed in the console in addition to being recorded in log files.

    This method provides a way to turn on real-time logging output to the console, which is particularly useful for development and debugging purposes, allowing for immediate feedback on logged events.

    @@ -89,7 +89,7 @@
    // Enable console logging for immediate log output
    logger.enableConsoleLogging();
    logger.log(LogLevel.INFO, "Console logging enabled");
    -
  • Retrieves the current status of console logging, indicating if logs are also output to the console.

    +
  • Retrieves the current status of console logging, indicating if logs are also output to the console.

    This getter provides access to the console logging status, useful for checking if real-time log output is enabled.

    N/A

      @@ -105,7 +105,7 @@
      const logger = Logger.getInstance();
      console.log(logger.getConsoleLogging());
      // Console Output: true (or false based on configuration)
      -
  • Retrieves the environment setting currently configured in the Logger instance, such as "development" or "production".

    +
  • Retrieves the environment setting currently configured in the Logger instance, such as "development" or "production".

    This getter method allows access to the environment setting, which determines where logs are stored based on runtime context.

    N/A

      @@ -121,7 +121,7 @@
      const logger = Logger.getInstance();
      console.log(logger.getEnv());
      // Console Output: "development"
      -
  • Retrieves the path of the directory where logs are stored, based on the Logger's configuration and environment setting.

    +
  • Retrieves the path of the directory where logs are stored, based on the Logger's configuration and environment setting.

    This method allows access to the path where logs are written, organized by environment. Useful for managing and verifying log storage locations.

    N/A

      @@ -137,7 +137,7 @@
      const logger = Logger.getInstance();
      console.log(logger.getLogsDirPath());
      // Console Output: "./logs/development" (example for development environment)
      -
  • The log method logs a message at a specified severity level with optional data. It supports both console +

  • The log method logs a message at a specified severity level with optional data. It supports both console output and file-based logging, structuring logs based on environment and log level.

    This method serves as the core logging function, allowing consistent recording of messages across the library. By accepting a log level and optional data, it provides detailed logging for events, errors, or informational messages.

    @@ -176,7 +176,7 @@
    // Logs a critical error with associated data
    logger.log(LogLevel.ERROR, "Database connection failed", { errorCode: "DB_CONN_ERR", timestamp: Date.now() });

    // Logs an informational message
    logger.log(LogLevel.INFO, "Server started successfully");
    -
  • Provides access to the singleton instance of the Logger class. This method ensures that only one instance of the logger is created and shared across the application, providing a centralized logging management system. It initializes the logger with a configuration if not already initialized.

    The getInstance method enforces the Singleton pattern, ensuring that a single instance of the logger is used @@ -210,4 +210,4 @@

    // Initialize and retrieve the Logger instance with configuration
    const logger = Logger.getInstance({ logDirPath: "./logs", enableConsoleLogging: true });
    logger.log(LogLevel.INFO, "Application started"); // Logs with the singleton logger instance

    // Retrieve the existing Logger instance without reinitializing
    const anotherLoggerReference = Logger.getInstance();
    anotherLoggerReference.log(LogLevel.ERROR, "Unexpected error occurred");
    // Both `logger` and `anotherLoggerReference` refer to the same Logger instance
    -
+
diff --git a/docs/site/classes/models_pokerGame.PokerGame.html b/docs/classes/models_pokerGame.PokerGame.html similarity index 99% rename from docs/site/classes/models_pokerGame.PokerGame.html rename to docs/classes/models_pokerGame.PokerGame.html index 5cbe4a7..475d950 100644 --- a/docs/site/classes/models_pokerGame.PokerGame.html +++ b/docs/classes/models_pokerGame.PokerGame.html @@ -1,7 +1,7 @@ PokerGame | casinojs

PokerGame Represents the current PokerGame being played at the PokerTable. Manages the deck, community cards, and game phases, such as pre-flop, flop, turn, and river.

-

Hierarchy (view full)

Implements

Constructors

Hierarchy (view full)

Implements

Constructors

Properties

Parameters

Returns PokerGame

const deck = new Deck();
 
-

Properties

captureRejections: boolean

Value: boolean

+

Properties

captureRejections: boolean

Value: boolean

Change the default captureRejections option on all new EventEmitter objects.

v13.4.0, v12.16.0

captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

@@ -118,19 +118,19 @@
  • event: {
        data: {
            [key: string]: any;
        };
        [key: string]: any;
    }
    • [key: string]: any
    • data: {
          [key: string]: any;
      }
      • [key: string]: any
  • Optionalmiddlewares?: ((event: BaseEventInterface<any>, next: (() => void)) => false | void)[]

Returns void

emitter.emitEvent("game:started", {
event: { data: { gameId: "001", status: "active" } },
middlewares: [
(event, next) => { console.log("Processing event:", event); next(); },
(event, next) => { event.data.processed = true; next(); }
]
});
-
  • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ]

    Returns (string | symbol)[]

    v6.0.0

    -
  • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      @@ -172,7 +172,7 @@

    Returns void

    emitter.emitEvent("game:started", {
    event: { data: { gameId: "001", status: "active" } },
    middlewares: [
    (event, next) => { console.log("Processing event:", event); next(); },
    (event, next) => { event.data.processed = true; next(); }
    ]
    });
    -
  • Alias for emitter.removeListener().

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v10.0.0

  • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already diff --git a/docs/site/classes/models_pokerPhase.PokerPhase.html b/docs/classes/models_pokerPhase.PokerPhase.html similarity index 99% rename from docs/site/classes/models_pokerPhase.PokerPhase.html rename to docs/classes/models_pokerPhase.PokerPhase.html index 59b2812..ce701da 100644 --- a/docs/site/classes/models_pokerPhase.PokerPhase.html +++ b/docs/classes/models_pokerPhase.PokerPhase.html @@ -24,7 +24,7 @@

    const pokerPhase = new PokerPhase();
    pokerPhase.on('phase:change', (newPhase) => console.log(`Phase changed to ${newPhase}`));
    pokerPhase.nextPhase();
    console.log(pokerPhase.getCurrentPhase()); // Outputs the next game phase, e.g., "Flop"
    -

Hierarchy (view full)

Implements

Constructors

Hierarchy (view full)

Implements

Returns PokerPhase

const pokerPhase = new PokerPhase({
name: PokerPhases.PRE_FLOP,
deck: new Deck(),
communityCards: [],
players: [...],
pot: 0,
dealerPos: 0,
smallBlindPos: 1,
bigBlindPos: 2
});
-

Properties

captureRejections: boolean

Value: boolean

+

Properties

captureRejections: boolean

Value: boolean

Change the default captureRejections option on all new EventEmitter objects.

v13.4.0, v12.16.0

captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

@@ -127,22 +127,22 @@
const rank = card.getRank();
console.log(rank); // "A"
-
  • Alias for emitter.on(eventName, listener).

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v0.1.26

  • dealCommunityCards Deals the community cards to the table during the flop, turn, or river phases.

    Parameters

    • count: number

      The number of community cards to deal (3 for the flop, 1 for the turn/river).

      -

    Returns boolean

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +

Returns boolean

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

    Returns true if the event had listeners, false otherwise.

    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener @@ -180,13 +180,13 @@
    • event: {
          data: {
              [key: string]: any;
          };
          [key: string]: any;
      }
      • [key: string]: any
      • data: {
            [key: string]: any;
        }
        • [key: string]: any
    • Optionalmiddlewares?: ((event: BaseEventInterface<any>, next: (() => void)) => false | void)[]

Returns void

emitter.emitEvent("game:started", {
event: { data: { gameId: "001", status: "active" } },
middlewares: [
(event, next) => { console.log("Processing event:", event); next(); },
(event, next) => { event.data.processed = true; next(); }
]
});
-
  • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ]

    Returns (string | symbol)[]

    v6.0.0

    -
  • Retrieves the position of the player assigned the big blind.

    N/A

    N/A

    Helps identify the player with the big blind, aiding in betting actions.

    @@ -202,7 +202,7 @@
    const bigBlindPosition = pokerPhase.getBigBlindPos();
    console.log(bigBlindPosition); // Outputs: 2
    -
  • Retrieves the position of the player whose turn it currently is within the PokerPhase.

    +
  • Retrieves the position of the player whose turn it currently is within the PokerPhase.

    N/A

    N/A

    Helps identify the active player during the phase, supporting turn-based actions.

    @@ -218,7 +218,7 @@
    const currentPosition = pokerPhase.getCurrentPlayerPos();
    console.log(currentPosition); // Outputs: 2
    -
  • Retrieves the dealer's position for the current phase of poker.

    N/A

    N/A

    Indicates which player holds the dealer role, which is essential for turn-based actions.

    @@ -234,7 +234,7 @@
    const dealerPosition = pokerPhase.getDealerPos();
    console.log(dealerPosition); // Outputs: 0
    -
  • Retrieves the deck of cards currently being used in the PokerPhase.

    N/A

    N/A

    Accesses the deck to support game actions involving the deck, such as dealing or shuffling.

    @@ -250,7 +250,7 @@
    const deck = pokerPhase.getDeck();
    console.log(deck); // Outputs the deck object
    -
  • Retrieves the current phase name (e.g., "Pre-Flop," "Flop") of the PokerPhase.

    @@ -269,7 +269,7 @@
    const phaseName = pokerPhase.getName();
    console.log(phaseName); // Outputs: "Pre-Flop"
    -
  • Retrieves the list of players currently involved in the PokerPhase.

    N/A

    N/A

    Accesses the players participating in the current phase, supporting functions that involve player actions or status.

    @@ -286,7 +286,7 @@
    const players = pokerPhase.getPlayers();
    console.log(players); // Outputs an array of player objects
    -
  • Retrieves the current total pot amount for the PokerPhase.

    N/A

    N/A

    Provides the total value of bets placed in the current phase, aiding in bet-related actions.

    @@ -302,7 +302,7 @@
    const potAmount = pokerPhase.getPot();
    console.log(potAmount); // Outputs: 1000
    -
  • Retrieves the position of the player assigned the small blind.

    N/A

    N/A

    Helps identify the player with the small blind, aiding in betting actions.

    @@ -318,7 +318,7 @@
    const smallBlindPosition = pokerPhase.getSmallBlindPos();
    console.log(smallBlindPosition); // Outputs: 1
    -
  • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      @@ -360,7 +360,7 @@

    Returns void

    emitter.emitEvent("game:started", {
    event: { data: { gameId: "001", status: "active" } },
    middlewares: [
    (event, next) => { console.log("Processing event:", event); next(); },
    (event, next) => { event.data.processed = true; next(); }
    ]
    });
    -
  • Alias for emitter.removeListener().

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v10.0.0

  • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already @@ -453,7 +453,7 @@

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v0.1.26

  • resolveBets Resolves the current betting round, updating player chip stacks and determining the winner if applicable.

    -

    Returns void

  • By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    diff --git a/docs/site/classes/models_pokerPlayer.PokerPlayer.html b/docs/classes/models_pokerPlayer.PokerPlayer.html similarity index 99% rename from docs/site/classes/models_pokerPlayer.PokerPlayer.html rename to docs/classes/models_pokerPlayer.PokerPlayer.html index 713b39f..041dd1f 100644 --- a/docs/site/classes/models_pokerPlayer.PokerPlayer.html +++ b/docs/classes/models_pokerPlayer.PokerPlayer.html @@ -1,7 +1,7 @@ PokerPlayer | casinojs

    PokerPlayerInterface Represents a player seated at the PokerTable. The player can place bets, fold, and manage their chip stack during the game.

    -

    Hierarchy (view full)

    Implements

    Constructors

    Hierarchy (view full)

    Implements

    Constructors

    Properties

    Parameters

    Returns PokerPlayer

    const deck = new Deck();
     
    -

Properties

captureRejections: boolean

Value: boolean

+

Properties

captureRejections: boolean

Value: boolean

Change the default captureRejections option on all new EventEmitter objects.

v13.4.0, v12.16.0

captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

@@ -89,15 +89,15 @@
const rank = card.getRank();
console.log(rank); // "A"
-
  • Alias for emitter.on(eventName, listener).

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v0.1.26

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +

    Parameters

    • amount: number

    Returns boolean

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

    Returns true if the event had listeners, false otherwise.

    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener @@ -135,7 +135,7 @@
    • event: {
          data: {
              [key: string]: any;
          };
          [key: string]: any;
      }
      • [key: string]: any
      • data: {
            [key: string]: any;
        }
        • [key: string]: any
    • Optionalmiddlewares?: ((event: BaseEventInterface<any>, next: (() => void)) => false | void)[]

Returns void

emitter.emitEvent("game:started", {
event: { data: { gameId: "001", status: "active" } },
middlewares: [
(event, next) => { console.log("Processing event:", event); next(); },
(event, next) => { event.data.processed = true; next(); }
]
});
-
  • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ]
    @@ -147,19 +147,19 @@
    const rank = card.getRank();
    console.log(rank); // "A"
    -
  • getHand

    Returns the poker table's id.

    Returns boolean

    The poker table's id.

    const rank = card.getRank();
    console.log(rank); // "A"
    -
  • isFolded

    Returns the poker table's id.

    Returns boolean

    The poker table's id.

    const rank = card.getRank();
    console.log(rank); // "A"
    -
  • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      @@ -222,7 +222,7 @@

    Returns void

    emitter.emitEvent("game:started", {
    event: { data: { gameId: "001", status: "active" } },
    middlewares: [
    (event, next) => { console.log("Processing event:", event); next(); },
    (event, next) => { event.data.processed = true; next(); }
    ]
    });
    -
  • Alias for emitter.removeListener().

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v10.0.0

  • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already @@ -319,7 +319,7 @@

    const rank = card.getRank();
    console.log(rank); // "A"
    -
  • By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    @@ -351,7 +351,7 @@
    const pokerRoom = new PokerRoom({ name: "Room1", tableSize: 6 });
    pokerRoom.setName("HighRollers"); // Sets the name of the room to "HighRollers"
    console.log(pokerRoom.getName()); // Logs "HighRollers"
    -
  • Experimental

    Listens once to the abort event on the provided signal.

    Listening to the abort event on abort signals is unsafe and may lead to resource leaks since another third party with the signal can call e.stopImmediatePropagation(). Unfortunately Node.js cannot change diff --git a/docs/site/classes/models_pokerRoom.PokerRoom.html b/docs/classes/models_pokerRoom.PokerRoom.html similarity index 99% rename from docs/site/classes/models_pokerRoom.PokerRoom.html rename to docs/classes/models_pokerRoom.PokerRoom.html index defd236..6929972 100644 --- a/docs/site/classes/models_pokerRoom.PokerRoom.html +++ b/docs/classes/models_pokerRoom.PokerRoom.html @@ -1,7 +1,7 @@ PokerRoom | casinojs

    PokerRoom Represents a PokerRoom within a Casino that holds a single PokerTable. The PokerRoom manages the player queue, automatically assigning players to the PokerTable as seats become available. This class extends BaseEventEmitter and implements the PokerRoomInterface interface.

    -

    Hierarchy (view full)

    Implements

    Constructors

    Hierarchy (view full)

    Implements

    Constructors

    Properties

    Parameters

    Returns PokerRoom

    const casino = new Casino();
    console.log(casino.getRooms()); // Output: []
    -

Properties

captureRejections: boolean

Value: boolean

+

Properties

captureRejections: boolean

Value: boolean

Change the default captureRejections option on all new EventEmitter objects.

v13.4.0, v12.16.0

captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

@@ -104,10 +104,10 @@
class SpecialCasino extends Casino {
public createSpecialRoom(config: PokerRoomConfig): PokerRoomInterface {
return this._createRoom(config);
}
}
const specialCasino = new SpecialCasino();
const newRoom = specialCasino.createSpecialRoom({ name: "Champions Lounge", tableSize: 10, smallBlind: 100, bigBlind: 200 });
console.log(newRoom.getName()); // Outputs: "Champions Lounge"
-
  • Alias for emitter.on(eventName, listener).

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v0.1.26

  • Creates a new PokerRoom instance based on the provided configuration and adds it to the Casino's rooms list.

    N/A

    @@ -131,7 +131,7 @@
    class SpecialCasino extends Casino {
    public createSpecialRoom(config: PokerRoomConfig): PokerRoomInterface {
    return this._createRoom(config);
    }
    }
    const specialCasino = new SpecialCasino();
    const newRoom = specialCasino.createSpecialRoom({ name: "Champions Lounge", tableSize: 10, smallBlind: 100, bigBlind: 200 });
    console.log(newRoom.getName()); // Outputs: "Champions Lounge"
    -
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

    Returns true if the event had listeners, false otherwise.

    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener @@ -169,7 +169,7 @@
    • event: {
          data: {
              [key: string]: any;
          };
          [key: string]: any;
      }
      • [key: string]: any
      • data: {
            [key: string]: any;
        }
        • [key: string]: any
    • Optionalmiddlewares?: ((event: BaseEventInterface<any>, next: (() => void)) => false | void)[]

Returns void

emitter.emitEvent("game:started", {
event: { data: { gameId: "001", status: "active" } },
middlewares: [
(event, next) => { console.log("Processing event:", event); next(); },
(event, next) => { event.data.processed = true; next(); }
]
});
-
  • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ]
    @@ -196,7 +196,7 @@
    class SpecialCasino extends Casino {
    public createSpecialRoom(config: PokerRoomConfig): PokerRoomInterface {
    return this._createRoom(config);
    }
    }
    const specialCasino = new SpecialCasino();
    const newRoom = specialCasino.createSpecialRoom({ name: "Champions Lounge", tableSize: 10, smallBlind: 100, bigBlind: 200 });
    console.log(newRoom.getName()); // Outputs: "Champions Lounge"
    -
  • Retrieves the current name of the PokerRoom.

    @@ -218,7 +218,7 @@
    const pokerRoom = new PokerRoom({ name: "VIP Room", tableSize: 6 });
    console.log(pokerRoom.getName()); // Logs "VIP Room"
    -
  • Retrieves the associated PokerTable instance within the PokerRoom.

    N/A - This method does not implement external interfaces.

    N/A - This method does not override any superclass or parent methods.

    The getTable method provides access to the PokerTable instance that is actively managed by the PokerRoom. @@ -237,7 +237,7 @@

    const pokerRoom = new PokerRoom({ name: "High Stakes", tableSize: 6 });
    const table = pokerRoom.getTable();
    console.log(table); // Logs the PokerTable instance associated with "High Stakes" room
    -
  • Checks if a provided index is within the valid range of the Casino’s room list.

    Implements the isValidIndex method of CasinoInterface.

    N/A

    This method helps validate that an index is within the valid bounds of the Casino’s room list. It prevents @@ -265,7 +265,7 @@

    const casino = new Casino();
    try {
    casino.isValidIndex(2); // Returns true if there are at least 3 rooms
    } catch (error) {
    console.error(error.message); // If index 2 is out of bounds, logs error message
    }
    -
  • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      @@ -307,7 +307,7 @@

    Returns void

    emitter.emitEvent("game:started", {
    event: { data: { gameId: "001", status: "active" } },
    middlewares: [
    (event, next) => { console.log("Processing event:", event); next(); },
    (event, next) => { event.data.processed = true; next(); }
    ]
    });
    -
  • Alias for emitter.removeListener().

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v10.0.0

  • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already @@ -430,7 +430,7 @@

    const pokerRoom = new PokerRoom({ name: "Room1", tableSize: 6 });
    pokerRoom.setName("HighRollers"); // Sets the name of the room to "HighRollers"
    console.log(pokerRoom.getName()); // Logs "HighRollers"
    -
  • Sets the table configuration within the PokerRoom. The table configuration determines essential settings for the poker table, such as table size, small blind, and big blind values.

    N/A - This method is part of the PokerRoomInterface and does not implement any external methods.

    N/A - This method does not override any superclass or parent methods.

    @@ -455,10 +455,10 @@
    const pokerRoom = new PokerRoom({ name: "Room3", tableSize: 8 });
    const tableConfig = new PokerTable({ tableSize: 8, smallBlind: 10, bigBlind: 20 });
    pokerRoom.setTables(tableConfig); // Configures the table for the room
    console.log(pokerRoom.getTable()); // Logs the table configuration
    -
  • size Starts a new PokerGame if there are at least two active players at the PokerTable. This method initiates the game flow, including assigning blinds and starting the rounds.

    -

    Returns number

  • Returns the total number of PokerRoom instances currently managed by the Casino.

    +

    Returns number

  • Returns the total number of PokerRoom instances currently managed by the Casino.

    Implements the roomCount method of CasinoInterface.

    N/A

    Provides a simple way to check how many poker rooms the Casino is currently managing. Useful for general @@ -477,7 +477,7 @@

    const casino = new Casino();
    const count = casino.roomCount();
    console.log(count); // Logs the total number of managed rooms, e.g., 5
    -
  • Experimental

    Listens once to the abort event on the provided signal.

    Listening to the abort event on abort signals is unsafe and may lead to resource leaks since another third party with the signal can call e.stopImmediatePropagation(). Unfortunately Node.js cannot change diff --git a/docs/site/classes/models_pokerSeat.PokerSeat.html b/docs/classes/models_pokerSeat.PokerSeat.html similarity index 99% rename from docs/site/classes/models_pokerSeat.PokerSeat.html rename to docs/classes/models_pokerSeat.PokerSeat.html index db29dde..ce928b2 100644 --- a/docs/site/classes/models_pokerSeat.PokerSeat.html +++ b/docs/classes/models_pokerSeat.PokerSeat.html @@ -26,7 +26,7 @@

    const pokerSeat = new PokerSeat();
    pokerSeat.on(PokerSeatEvents.SEAT_OCCUPIED, () => console.log("Seat is now occupied"));
    pokerSeat.occupySeat(player);
    console.log(pokerSeat.isSeatOccupied()); // Console Output: true
    -

Hierarchy (view full)

Implements

Constructors

Hierarchy (view full)

Implements

Returns PokerSeat

const seatConfig = { id: "seat1", position: 3, isDealer: false };
const pokerSeat = new PokerSeat(seatConfig);
console.log(pokerSeat.getPosition()); // Console Output: 3
-

Properties

captureRejections: boolean

Value: boolean

+

Properties

captureRejections: boolean

Value: boolean

Change the default captureRejections option on all new EventEmitter objects.

v13.4.0, v12.16.0

captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

@@ -163,7 +163,7 @@
  • event: {
        data: {
            [key: string]: any;
        };
        [key: string]: any;
    }
    • [key: string]: any
    • data: {
          [key: string]: any;
      }
      • [key: string]: any
  • Optionalmiddlewares?: ((event: BaseEventInterface<any>, next: (() => void)) => false | void)[]

Returns void

emitter.emitEvent("game:started", {
event: { data: { gameId: "001", status: "active" } },
middlewares: [
(event, next) => { console.log("Processing event:", event); next(); },
(event, next) => { event.data.processed = true; next(); }
]
});
-
  • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ]
    @@ -191,7 +191,7 @@
    const pokerSeat = new PokerSeat();
    console.log(pokerSeat.getId());
    // Console Output: a unique string identifier, e.g., "123e4567-e89b-12d3-a456-426614174000"
    -
  • The getPlayer method is a public getter that retrieves the player occupying this seat, if any.

    @@ -215,7 +215,7 @@
    const pokerSeat = new PokerSeat();
    pokerSeat.occupySeat(player); // player implements PokerPlayerInterface
    console.log(pokerSeat.getPlayer());
    // Console Output: <PlayerInstance>
    -
  • The getPosition method is a public getter that retrieves the seat’s position at the poker table.

    N/A

    N/A

    This method provides access to the seat's specific position on the poker table, which is important for managing @@ -236,7 +236,7 @@

    const pokerSeat = new PokerSeat({ position: 3 });
    console.log(pokerSeat.getPosition());
    // Console Output: 3
    -
  • The isDealer method is a public getter that checks if this seat is currently designated as the dealer seat.

    N/A

    N/A

    This method indicates whether the seat has been designated as the dealer, which is critical for determining @@ -257,13 +257,13 @@

    const pokerSeat = new PokerSeat();
    pokerSeat.setDealer(true);
    console.log(pokerSeat.isDealer());
    // Console Output: true
    -
  • The isOccupied method checks if the seat is currently occupied by a player.

    This method is essential for determining seat occupancy status, enabling other parts of the program to verify if a seat is taken before allowing actions such as seating another player.

    Returns boolean

    • true if the seat has a player, otherwise false.
    -
  • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      @@ -305,11 +305,11 @@

    Returns void

    emitter.emitEvent("game:started", {
    event: { data: { gameId: "001", status: "active" } },
    middlewares: [
    (event, next) => { console.log("Processing event:", event); next(); },
    (event, next) => { event.data.processed = true; next(); }
    ]
    });
    -
  • The occupy method assigns a player to occupy this seat.

    This method assigns a player to the seat, indicating the seat is occupied. It is essential for seating management, allowing a player to be seated at a specific position at the poker table.

    Parameters

    Returns void

  • Alias for emitter.removeListener().

    +

Returns void

  • Alias for emitter.removeListener().

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v10.0.0

  • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already @@ -437,7 +437,7 @@

    const pokerSeat = new PokerSeat({ position: 2 });
    pokerSeat.setDealer(true); // Sets the seat as the dealer
    console.log(pokerSeat.isDealer()); // Console Output: true

    pokerSeat.setDealer(false); // Removes dealer designation
    console.log(pokerSeat.isDealer()); // Console Output: false
    -
  • By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    @@ -446,7 +446,7 @@
  • The vacate method removes the player from the seat, marking it as unoccupied.

    This method allows for freeing up the seat by removing the player, which is essential in poker games where players may need to leave their seat or be reassigned to a different seat.

    -

    Returns void

  • Experimental

    Listens once to the abort event on the provided signal.

    Listening to the abort event on abort signals is unsafe and may lead to resource leaks since another third party with the signal can call e.stopImmediatePropagation(). Unfortunately Node.js cannot change diff --git a/docs/site/classes/models_pokerTable.PokerTable.html b/docs/classes/models_pokerTable.PokerTable.html similarity index 99% rename from docs/site/classes/models_pokerTable.PokerTable.html rename to docs/classes/models_pokerTable.PokerTable.html index 70c4421..89b67b4 100644 --- a/docs/site/classes/models_pokerTable.PokerTable.html +++ b/docs/classes/models_pokerTable.PokerTable.html @@ -28,7 +28,7 @@

    const pokerTable = new PokerTable();
    pokerTable.on('table:gameStarted', () => console.log("Game has started"));
    pokerTable.seatPlayer({ name: "Alice", chips: 100 });
    pokerTable.startGame();
    console.log(pokerTable.getQueue()); // Logs the current queue of waiting players
    -

Hierarchy (view full)

Implements

Constructors

Hierarchy (view full)

Implements

Returns PokerTable

const config = { id: "Table42", smallBlind: 25, size: 6 };
const pokerTable = new PokerTable(config);
console.log(pokerTable.getSeats().length); // Output: 6
-

Properties

captureRejections: boolean

Value: boolean

+

Properties

captureRejections: boolean

Value: boolean

Change the default captureRejections option on all new EventEmitter objects.

v13.4.0, v12.16.0

captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

@@ -135,16 +135,16 @@
const rank = card.getRank();
console.log(rank); // "A"
-
  • Alias for emitter.on(eventName, listener).

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v0.1.26

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

    @@ -184,7 +184,7 @@
    • event: {
          data: {
              [key: string]: any;
          };
          [key: string]: any;
      }
      • [key: string]: any
      • data: {
            [key: string]: any;
        }
        • [key: string]: any
    • Optionalmiddlewares?: ((event: BaseEventInterface<any>, next: (() => void)) => false | void)[]

Returns void

emitter.emitEvent("game:started", {
event: { data: { gameId: "001", status: "active" } },
middlewares: [
(event, next) => { console.log("Processing event:", event); next(); },
(event, next) => { event.data.processed = true; next(); }
]
});
-
  • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ]
    @@ -196,28 +196,28 @@
    const rank = card.getRank();
    console.log(rank); // "A"
    -
  • getId

    Returns the poker table's id.

    Returns number

    The poker table's id.

    const rank = card.getRank();
    console.log(rank); // "A"
    -
  • getSeats Starts a new PokerGame if there are at least two active players at the PokerTable. This method initiates the game flow, including assigning blinds and starting the rounds.

    -

    Returns boolean

  • Checks if a provided index is within the valid range of the Casino’s room list.

    +

    Returns boolean

  • Checks if a provided index is within the valid range of the Casino’s room list.

    Implements the isValidIndex method of CasinoInterface.

    N/A

    This method helps validate that an index is within the valid bounds of the Casino’s room list. It prevents @@ -245,7 +245,7 @@

    const casino = new Casino();
    try {
    casino.isValidIndex(2); // Returns true if there are at least 3 rooms
    } catch (error) {
    console.error(error.message); // If index 2 is out of bounds, logs error message
    }
    -
  • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      @@ -287,7 +287,7 @@

    Returns void

    emitter.emitEvent("game:started", {
    event: { data: { gameId: "001", status: "active" } },
    middlewares: [
    (event, next) => { console.log("Processing event:", event); next(); },
    (event, next) => { event.data.processed = true; next(); }
    ]
    });
    -
  • Alias for emitter.removeListener().

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v10.0.0

  • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already @@ -397,7 +397,7 @@

    const casino = new Casino();
    const count = casino.roomCount();
    console.log(count); // Logs the total number of managed rooms, e.g., 5
    -
  • By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    @@ -429,7 +429,7 @@
    const pokerRoom = new PokerRoom({ name: "Room1", tableSize: 6 });
    pokerRoom.setName("HighRollers"); // Sets the name of the room to "HighRollers"
    console.log(pokerRoom.getName()); // Logs "HighRollers"
    -
  • Sets the queue of players waiting to enter the PokerTable within the PokerRoom. This queue helps manage player flow and assign seating as tables become available.

    N/A - This method is part of the PokerRoomInterface and does not implement any external methods.

    N/A - This method does not override any superclass or parent methods.

    @@ -455,11 +455,11 @@
    const pokerRoom = new PokerRoom({ name: "Room2", tableSize: 6 });
    const queue = [new PokerPlayer("Alice"), new PokerPlayer("Bob")];
    pokerRoom.setQueue(queue); // Sets the player queue
    console.log(pokerRoom.getQueue()); // Logs the updated player queue
    -
  • size Starts a new PokerGame if there are at least two active players at the PokerTable. This method initiates the game flow, including assigning blinds and starting the rounds.

    -

    Returns number

  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Returns number

  • Experimental

    Listens once to the abort event on the provided signal.

    Listening to the abort event on abort signals is unsafe and may lead to resource leaks since another third party with the signal can call e.stopImmediatePropagation(). Unfortunately Node.js cannot change diff --git a/docs/site/enums/enums_events_casino.CasinoEvents.html b/docs/enums/enums_events_casino.CasinoEvents.html similarity index 97% rename from docs/site/enums/enums_events_casino.CasinoEvents.html rename to docs/enums/enums_events_casino.CasinoEvents.html index a8db44b..7b65ee7 100644 --- a/docs/site/enums/enums_events_casino.CasinoEvents.html +++ b/docs/enums/enums_events_casino.CasinoEvents.html @@ -4,19 +4,19 @@

    const eventName = CasinoEvents.ROOM_CREATED;
    console.log(eventName);
    // Output: "Casino:PokerRoomCreated"
    -

Enumeration Members

Enumeration Members

ROOM_ADDED

ROOM_ADDED - Emitted when a single room is added to the casino's list of managed rooms.

Allows listeners to respond when a new room is introduced into the Casino’s list of available rooms.

-
ROOM_CREATED

ROOM_CREATED - Emitted when a new room is created and added to the casino's list of managed rooms.

+
ROOM_CREATED

ROOM_CREATED - Emitted when a new room is created and added to the casino's list of managed rooms.

Notifies listeners when a new poker room has been successfully created and added to the Casino’s managed list.

-
ROOM_DELETED

ROOM_DELETED - Emitted when an existing room is removed from the casino's list of managed rooms.

+
ROOM_DELETED

ROOM_DELETED - Emitted when an existing room is removed from the casino's list of managed rooms.

Enables clean-up or resource reallocation processes by notifying listeners when a room is removed from the Casino.

-
ROOM_UPDATED

ROOM_UPDATED - Emitted when an existing room in the casino is modified.

+
ROOM_UPDATED

ROOM_UPDATED - Emitted when an existing room in the casino is modified.

Notifies listeners when a room’s configuration or attributes (e.g., blinds, player limits) have been updated.

-
ROOMS_SET

ROOMS_SET - Emitted when the casino’s managed list of rooms is set to a new batch of rooms.

+
ROOMS_SET

ROOMS_SET - Emitted when the casino’s managed list of rooms is set to a new batch of rooms.

Notifies listeners when the Casino’s full list of rooms has been reset or replaced with a new set of rooms.

-
+
diff --git a/docs/site/enums/enums_events_deck.DeckEvents.html b/docs/enums/enums_events_deck.DeckEvents.html similarity index 97% rename from docs/site/enums/enums_events_deck.DeckEvents.html rename to docs/enums/enums_events_deck.DeckEvents.html index 3d44dd8..d42923b 100644 --- a/docs/site/enums/enums_events_deck.DeckEvents.html +++ b/docs/enums/enums_events_deck.DeckEvents.html @@ -15,9 +15,9 @@
const seatEvent: DeckEvents = DeckEvents.OCCUPIED;
console.log(seatEvent);
// Console Output: "Deck:Occupied"
-

Enumeration Members

Enumeration Members

Enumeration Members

INITIALIZED

Indicates that the seat has been initialized and is ready for occupancy.

const seatEvent: DeckEvents = DeckEvents.INITIALIZED;
console.log(seatEvent);
// Console Output: "Deck:Initialized"
-
+
diff --git a/docs/site/enums/enums_events_pokerGame.PokerGameEvents.html b/docs/enums/enums_events_pokerGame.PokerGameEvents.html similarity index 97% rename from docs/site/enums/enums_events_pokerGame.PokerGameEvents.html rename to docs/enums/enums_events_pokerGame.PokerGameEvents.html index 2acbcdc..f7d1054 100644 --- a/docs/site/enums/enums_events_pokerGame.PokerGameEvents.html +++ b/docs/enums/enums_events_pokerGame.PokerGameEvents.html @@ -15,9 +15,9 @@
const seatEvent: PokerGameEvents = PokerGameEvents.OCCUPIED;
console.log(seatEvent);
// Console Output: "PokerGame:Occupied"
-

Enumeration Members

Enumeration Members

Enumeration Members

INITIALIZED

Indicates that the seat has been initialized and is ready for occupancy.

const seatEvent: PokerGameEvents = PokerGameEvents.INITIALIZED;
console.log(seatEvent);
// Console Output: "PokerGame:Initialized"
-
+
diff --git a/docs/site/enums/enums_events_pokerPhase.PokerPhaseEvents.html b/docs/enums/enums_events_pokerPhase.PokerPhaseEvents.html similarity index 97% rename from docs/site/enums/enums_events_pokerPhase.PokerPhaseEvents.html rename to docs/enums/enums_events_pokerPhase.PokerPhaseEvents.html index d735796..4fbea53 100644 --- a/docs/site/enums/enums_events_pokerPhase.PokerPhaseEvents.html +++ b/docs/enums/enums_events_pokerPhase.PokerPhaseEvents.html @@ -15,9 +15,9 @@
const seatEvent: PokerPhaseEvents = PokerPhaseEvents.OCCUPIED;
console.log(seatEvent);
// Console Output: "PokerPhase:Occupied"
-

Enumeration Members

Enumeration Members

Enumeration Members

INITIALIZED

Indicates that the seat has been initialized and is ready for occupancy.

const seatEvent: PokerPhaseEvents = PokerPhaseEvents.INITIALIZED;
console.log(seatEvent);
// Console Output: "PokerPhase:Initialized"
-
+
diff --git a/docs/site/enums/enums_events_pokerPlayer.PokerPlayerEvents.html b/docs/enums/enums_events_pokerPlayer.PokerPlayerEvents.html similarity index 97% rename from docs/site/enums/enums_events_pokerPlayer.PokerPlayerEvents.html rename to docs/enums/enums_events_pokerPlayer.PokerPlayerEvents.html index df9108e..840e92d 100644 --- a/docs/site/enums/enums_events_pokerPlayer.PokerPlayerEvents.html +++ b/docs/enums/enums_events_pokerPlayer.PokerPlayerEvents.html @@ -15,9 +15,9 @@
const seatEvent: PokerPlayerEvents = PokerPlayerEvents.OCCUPIED;
console.log(seatEvent);
// Console Output: "PokerPlayer:Occupied"
-

Enumeration Members

Enumeration Members

Enumeration Members

INITIALIZED

Indicates that the seat has been initialized and is ready for occupancy.

const seatEvent: PokerPlayerEvents = PokerPlayerEvents.INITIALIZED;
console.log(seatEvent);
// Console Output: "PokerPlayer:Initialized"
-
+
diff --git a/docs/site/enums/enums_events_pokerRoom.PokerRoomEvents.html b/docs/enums/enums_events_pokerRoom.PokerRoomEvents.html similarity index 97% rename from docs/site/enums/enums_events_pokerRoom.PokerRoomEvents.html rename to docs/enums/enums_events_pokerRoom.PokerRoomEvents.html index eb479e7..3b911ea 100644 --- a/docs/site/enums/enums_events_pokerRoom.PokerRoomEvents.html +++ b/docs/enums/enums_events_pokerRoom.PokerRoomEvents.html @@ -15,9 +15,9 @@
const seatEvent: PokerRoomEvents = PokerRoomEvents.OCCUPIED;
console.log(seatEvent);
// Console Output: "PokerRoom:Occupied"
-

Enumeration Members

Enumeration Members

Enumeration Members

INITIALIZED

Indicates that the seat has been initialized and is ready for occupancy.

const seatEvent: PokerRoomEvents = PokerRoomEvents.INITIALIZED;
console.log(seatEvent);
// Console Output: "PokerRoom:Initialized"
-
+
diff --git a/docs/site/enums/enums_events_pokerSeat.PokerSeatEvents.html b/docs/enums/enums_events_pokerSeat.PokerSeatEvents.html similarity index 96% rename from docs/site/enums/enums_events_pokerSeat.PokerSeatEvents.html rename to docs/enums/enums_events_pokerSeat.PokerSeatEvents.html index 1e27ecf..7302157 100644 --- a/docs/site/enums/enums_events_pokerSeat.PokerSeatEvents.html +++ b/docs/enums/enums_events_pokerSeat.PokerSeatEvents.html @@ -15,19 +15,19 @@
const seatEvent: PokerSeatEvents = PokerSeatEvents.OCCUPIED;
console.log(seatEvent);
// Console Output: "PokerSeat:Occupied"
-

Enumeration Members

Enumeration Members

Enumeration Members

INITIALIZED

Indicates that the seat has been initialized and is ready for occupancy.

const seatEvent: PokerSeatEvents = PokerSeatEvents.INITIALIZED;
console.log(seatEvent);
// Console Output: "PokerSeat:Initialized"
-
OCCUPIED

Indicates a seat has been occupied by a player.

+
OCCUPIED

Indicates a seat has been occupied by a player.

const seatEvent: PokerSeatEvents = PokerSeatEvents.OCCUPIED;
console.log(seatEvent);
// Console Output: "PokerSeat:Occupied"
-
VACATED

Indicates a seat has been vacated by a player.

+
VACATED

Indicates a seat has been vacated by a player.

const seatEvent: PokerSeatEvents = PokerSeatEvents.VACATED;
console.log(seatEvent);
// Console Output: "PokerSeat:Vacated"
-
+
diff --git a/docs/site/enums/enums_events_pokerTable.PokerTableEvents.html b/docs/enums/enums_events_pokerTable.PokerTableEvents.html similarity index 97% rename from docs/site/enums/enums_events_pokerTable.PokerTableEvents.html rename to docs/enums/enums_events_pokerTable.PokerTableEvents.html index c81a323..18bc815 100644 --- a/docs/site/enums/enums_events_pokerTable.PokerTableEvents.html +++ b/docs/enums/enums_events_pokerTable.PokerTableEvents.html @@ -15,9 +15,9 @@
const seatEvent: PokerTableEvents = PokerTableEvents.OCCUPIED;
console.log(seatEvent);
// Console Output: "PokerTable:Occupied"
-

Enumeration Members

Enumeration Members

Enumeration Members

INITIALIZED

Indicates that the seat has been initialized and is ready for occupancy.

const seatEvent: PokerTableEvents = PokerTableEvents.INITIALIZED;
console.log(seatEvent);
// Console Output: "PokerTable:Initialized"
-
+
diff --git a/docs/site/enums/enums_logLevels.LogLevel.html b/docs/enums/enums_logLevels.LogLevel.html similarity index 96% rename from docs/site/enums/enums_logLevels.LogLevel.html rename to docs/enums/enums_logLevels.LogLevel.html index 8406a7e..5af989b 100644 --- a/docs/site/enums/enums_logLevels.LogLevel.html +++ b/docs/enums/enums_logLevels.LogLevel.html @@ -14,16 +14,16 @@
const logLevel = LogLevel.INFO;
console.log(logLevel);
// Console Output: "info"
-

Enumeration Members

Enumeration Members

Enumeration Members

ERROR
const level = LogLevel.ERROR;
console.log(level);
// Console Output: "error"
-
INFO
const level = LogLevel.INFO;
console.log(level);
// Console Output: "info" +
INFO
const level = LogLevel.INFO;
console.log(level);
// Console Output: "info"
-
WARN
const level = LogLevel.WARN;
console.log(level);
// Console Output: "warning" +
WARN
const level = LogLevel.WARN;
console.log(level);
// Console Output: "warning"
-
+
diff --git a/docs/site/enums/enums_pokerPhases.PokerPhases.html b/docs/enums/enums_pokerPhases.PokerPhases.html similarity index 96% rename from docs/site/enums/enums_pokerPhases.PokerPhases.html rename to docs/enums/enums_pokerPhases.PokerPhases.html index 98c03bf..a4beb45 100644 --- a/docs/site/enums/enums_pokerPhases.PokerPhases.html +++ b/docs/enums/enums_pokerPhases.PokerPhases.html @@ -17,7 +17,7 @@
const currentPhase: PokerPhases = PokerPhases.PRE_FLOP;
console.log(currentPhase);
// Console Output: "Pre-Flop"
-

Enumeration Members

Enumeration Members

FLOP PRE_FLOP RIVER SHOWDOWN @@ -26,20 +26,20 @@
const currentPhase: PokerPhases = PokerPhases.FLOP;
console.log(currentPhase);
// Console Output: "Flop"
-
PRE_FLOP

The initial phase before any community cards are dealt.

+
PRE_FLOP

The initial phase before any community cards are dealt.

const currentPhase: PokerPhases = PokerPhases.PRE_FLOP;
console.log(currentPhase);
// Console Output: "Pre-Flop"
-
RIVER

The fourth phase where the fifth and final community card is dealt.

+
RIVER

The fourth phase where the fifth and final community card is dealt.

const currentPhase: PokerPhases = PokerPhases.RIVER;
console.log(currentPhase);
// Console Output: "River"
-
SHOWDOWN

The final phase where players reveal their hands to determine the winner.

+
SHOWDOWN

The final phase where players reveal their hands to determine the winner.

const currentPhase: PokerPhases = PokerPhases.SHOWDOWN;
console.log(currentPhase);
// Console Output: "ShowDown"
-
TURN

The third phase where a fourth community card is dealt.

+
TURN

The third phase where a fourth community card is dealt.

const currentPhase: PokerPhases = PokerPhases.TURN;
console.log(currentPhase);
// Console Output: "Turn"
-
+
diff --git a/docs/site/enums/enums_ranks.Rank.html b/docs/enums/enums_ranks.Rank.html similarity index 92% rename from docs/site/enums/enums_ranks.Rank.html rename to docs/enums/enums_ranks.Rank.html index cdf1f02..0f588eb 100644 --- a/docs/site/enums/enums_ranks.Rank.html +++ b/docs/enums/enums_ranks.Rank.html @@ -4,7 +4,7 @@
const rank = Rank.Ace;
console.log(rank);
//output: "A"
-

Enumeration Members

Ace +

Enumeration Members

Ace Eight Five Four @@ -17,4 +17,4 @@ Ten Three Two -

Enumeration Members

Ace
Eight
Five
Four
Jack
King
Nine
Queen
Seven
Six
Ten
Three
Two
+

Enumeration Members

Ace
Eight
Five
Four
Jack
King
Nine
Queen
Seven
Six
Ten
Three
Two
diff --git a/docs/site/enums/enums_sources.Source.html b/docs/enums/enums_sources.Source.html similarity index 95% rename from docs/site/enums/enums_sources.Source.html rename to docs/enums/enums_sources.Source.html index fe2c89b..c7f6866 100644 --- a/docs/site/enums/enums_sources.Source.html +++ b/docs/enums/enums_sources.Source.html @@ -23,7 +23,7 @@
const source = Source.POKER_GAME;
console.log(source);
// Console Output: "PokerGame"
-

Enumeration Members

Enumeration Members

_BASE CARD CASINO DECK @@ -37,40 +37,40 @@
const source = Source._BASE;
console.log(source);
// Console Output: "BaseEventEmitter"
-
CARD

Represents the Card model, corresponding to individual playing cards.

+
CARD

Represents the Card model, corresponding to individual playing cards.

const source = Source.CARD;
console.log(source);
// Console Output: "Card"
-
CASINO

Refers to the Casino model, which handles casino or game management operations.

+
CASINO

Refers to the Casino model, which handles casino or game management operations.

const source = Source.CASINO;
console.log(source);
// Console Output: "Casino"
-
DECK

Identifies the Deck, representing a collection of playing cards.

+
DECK

Identifies the Deck, representing a collection of playing cards.

const source = Source.DECK;
console.log(source);
// Console Output: "Deck"
-
POKER_GAME

Corresponds to the PokerGame model, responsible for managing the poker game actions and states.

+
POKER_GAME

Corresponds to the PokerGame model, responsible for managing the poker game actions and states.

const source = Source.POKER_GAME;
console.log(source);
// Console Output: "PokerGame"
-
POKER_PHASE

Represents the PokerPhase model, indicating stages or phases within a poker game.

+
POKER_PHASE

Represents the PokerPhase model, indicating stages or phases within a poker game.

const source = Source.POKER_PHASE;
console.log(source);
// Console Output: "PokerPhase"
-
POKER_PLAYER

Refers to the PokerPlayer model, encompassing player-specific data and actions.

+
POKER_PLAYER

Refers to the PokerPlayer model, encompassing player-specific data and actions.

const source = Source.POKER_PLAYER;
console.log(source);
// Console Output: "PokerPlayer"
-
POKER_ROOM

Corresponds to the PokerRoom model, representing rooms where games take place.

+
POKER_ROOM

Corresponds to the PokerRoom model, representing rooms where games take place.

const source = Source.POKER_ROOM;
console.log(source);
// Console Output: "PokerRoom"
-
POKER_SEAT

Refers to the PokerSeat model, representing individual seats within a poker table.

+
POKER_SEAT

Refers to the PokerSeat model, representing individual seats within a poker table.

const source = Source.POKER_SEAT;
console.log(source);
// Console Output: "PokerSeat"
-
POKER_TABLE

Represents the PokerTable model, which handles table-specific settings and seating.

+
POKER_TABLE

Represents the PokerTable model, which handles table-specific settings and seating.

const source = Source.POKER_TABLE;
console.log(source);
// Console Output: "PokerTable"
-
+
diff --git a/docs/site/enums/enums_suits.Suit.html b/docs/enums/enums_suits.Suit.html similarity index 94% rename from docs/site/enums/enums_suits.Suit.html rename to docs/enums/enums_suits.Suit.html index 0bbdb8a..fecdf49 100644 --- a/docs/site/enums/enums_suits.Suit.html +++ b/docs/enums/enums_suits.Suit.html @@ -4,8 +4,8 @@
const suit = Suit.Hearts;
console.log(suit); // "Hearts"
-

Enumeration Members

Enumeration Members

Enumeration Members

Clubs
Diamonds
Hearts
Spades
+

Enumeration Members

Clubs
Diamonds
Hearts
Spades
diff --git a/docs/site/functions/utils_generateUniqueId.generateUniqueId.html b/docs/functions/utils_generateUniqueId.generateUniqueId.html similarity index 98% rename from docs/site/functions/utils_generateUniqueId.generateUniqueId.html rename to docs/functions/utils_generateUniqueId.generateUniqueId.html index 6f32265..c1c8eef 100644 --- a/docs/site/functions/utils_generateUniqueId.generateUniqueId.html +++ b/docs/functions/utils_generateUniqueId.generateUniqueId.html @@ -1 +1 @@ -generateUniqueId | casinojs
+generateUniqueId | casinojs
diff --git a/docs/site/hierarchy.html b/docs/hierarchy.html similarity index 100% rename from docs/site/hierarchy.html rename to docs/hierarchy.html diff --git a/docs/site/index.html b/docs/index.html similarity index 100% rename from docs/site/index.html rename to docs/index.html diff --git a/docs/site/interfaces/interfaces__base.BaseEventEmitterInterface.html b/docs/interfaces/interfaces__base.BaseEventEmitterInterface.html similarity index 99% rename from docs/site/interfaces/interfaces__base.BaseEventEmitterInterface.html rename to docs/interfaces/interfaces__base.BaseEventEmitterInterface.html index 4f37326..758548d 100644 --- a/docs/site/interfaces/interfaces__base.BaseEventEmitterInterface.html +++ b/docs/interfaces/interfaces__base.BaseEventEmitterInterface.html @@ -1,6 +1,6 @@ BaseEventEmitterInterface | casinojs

Interface BaseEventEmitterInterface

BaseEventEmitterInterface Extends the standard Node.js EventEmitter, including listener management methods.

-
interface BaseEventEmitterInterface {
    [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
    addListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    emit<K>(eventName: string | symbol, ...args: AnyRest): boolean;
    eventNames(): (string | symbol)[];
    getMaxListeners(): number;
    listenerCount<K>(eventName: string | symbol, listener?: Function): number;
    listeners<K>(eventName: string | symbol): Function[];
    off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    on<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    once<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependOnceListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    rawListeners<K>(eventName: string | symbol): Function[];
    removeAllListeners(eventName?: string | symbol): this;
    removeListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    setMaxListeners(n: number): this;
}

Hierarchy (view full)

Implemented by

Methods

interface BaseEventEmitterInterface {
    [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
    addListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    emit<K>(eventName: string | symbol, ...args: AnyRest): boolean;
    eventNames(): (string | symbol)[];
    getMaxListeners(): number;
    listenerCount<K>(eventName: string | symbol, listener?: Function): number;
    listeners<K>(eventName: string | symbol): Function[];
    off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    on<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    once<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependOnceListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    rawListeners<K>(eventName: string | symbol): Function[];
    removeAllListeners(eventName?: string | symbol): this;
    removeListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    setMaxListeners(n: number): this;
}

Hierarchy (view full)

Implemented by

Methods

Returns (string | symbol)[]

v6.0.0

  • Retrieves the maximum number of listeners allowed for this instance.

    Returns number

    The maximum number of listeners, defaulting to Node.js’s EventEmitter.defaultMaxListeners.

    -
  • Returns the number of listeners listening for the event named eventName. +

  • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      diff --git a/docs/site/interfaces/interfaces_baseEvent.BaseEventInterface.html b/docs/interfaces/interfaces_baseEvent.BaseEventInterface.html similarity index 96% rename from docs/site/interfaces/interfaces_baseEvent.BaseEventInterface.html rename to docs/interfaces/interfaces_baseEvent.BaseEventInterface.html index a0f1cea..6551ee8 100644 --- a/docs/site/interfaces/interfaces_baseEvent.BaseEventInterface.html +++ b/docs/interfaces/interfaces_baseEvent.BaseEventInterface.html @@ -21,7 +21,7 @@
interface BaseEventInterface<T> {
    createdAt: Date;
    data: T;
    id: string;
    lastModifiedAt?: Date;
    meta?: {
        [key: string]: any;
    };
    name: string;
    priority?: number;
    source: string;
    status?: string;
    [key: string]: any;
}

Type Parameters

  • T = any

Indexable

  • [key: string]: any

    Allows additional properties for further extensibility.

    Enables flexible additions to event fields, supporting any custom key-value pair that may be required for specific events.

    -

Properties

Properties

createdAt data id lastModifiedAt? @@ -33,28 +33,28 @@

Properties

createdAt: Date
const creationTime = event.createdAt;
console.log(creationTime);
// Console Output: Date object representing the event's creation time.
-
data: T
const seatEventData = event.data;
console.log(seatEventData);
// Console Output: Custom data object, e.g., { seatId: "123", playerId: "p789" } +
data: T
const seatEventData = event.data;
console.log(seatEventData);
// Console Output: Custom data object, e.g., { seatId: "123", playerId: "p789" }
-
id: string
const eventId = event.id;
console.log(eventId);
// Console Output: "unique-id-1234" +
id: string
const eventId = event.id;
console.log(eventId);
// Console Output: "unique-id-1234"
-
lastModifiedAt?: Date
const modificationTime = event.lastModifiedAt;
console.log(modificationTime);
// Console Output: Date object representing the event's last modification time, if set. +
lastModifiedAt?: Date
const modificationTime = event.lastModifiedAt;
console.log(modificationTime);
// Console Output: Date object representing the event's last modification time, if set.
-
meta?: {
    [key: string]: any;
}
const eventMetadata = event.metadata;
console.log(eventMetadata);
// Console Output: { customMetaKey: "customMetaValue" } +
meta?: {
    [key: string]: any;
}
const eventMetadata = event.metadata;
console.log(eventMetadata);
// Console Output: { customMetaKey: "customMetaValue" }
-
name: string
const eventName = event.name;
console.log(eventName);
// Console Output: "Casino:RoomCreated" +
name: string
const eventName = event.name;
console.log(eventName);
// Console Output: "Casino:RoomCreated"
-
priority?: number
const eventPriority = event.priority;
console.log(eventPriority);
// Console Output: Integer representing event priority level. +
priority?: number
const eventPriority = event.priority;
console.log(eventPriority);
// Console Output: Integer representing event priority level.
-
source: string
const eventSource = event.source;
console.log(eventSource);
// Console Output: "PokerRoom" or similar string value. +
source: string
const eventSource = event.source;
console.log(eventSource);
// Console Output: "PokerRoom" or similar string value.
-
status?: string
const eventStatus = event.status;
console.log(eventStatus);
// Console Output: "in-progress" or other string value indicating status. +
status?: string
const eventStatus = event.status;
console.log(eventStatus);
// Console Output: "in-progress" or other string value indicating status.
-
+
diff --git a/docs/site/interfaces/interfaces_card.CardConfig.html b/docs/interfaces/interfaces_card.CardConfig.html similarity index 98% rename from docs/site/interfaces/interfaces_card.CardConfig.html rename to docs/interfaces/interfaces_card.CardConfig.html index 2986829..61cb135 100644 --- a/docs/site/interfaces/interfaces_card.CardConfig.html +++ b/docs/interfaces/interfaces_card.CardConfig.html @@ -1,5 +1,5 @@ CardConfig | casinojs

CardConfig Represents a Card Config.

-
interface CardConfig {
    rank: Rank;
    suit: Suit;
}

Properties

interface CardConfig {
    rank: Rank;
    suit: Suit;
}

Properties

Properties

rank: Rank
suit: Suit
+

Properties

rank: Rank
suit: Suit
diff --git a/docs/site/interfaces/interfaces_card.CardInterface.html b/docs/interfaces/interfaces_card.CardInterface.html similarity index 97% rename from docs/site/interfaces/interfaces_card.CardInterface.html rename to docs/interfaces/interfaces_card.CardInterface.html index a7350e5..377a1c8 100644 --- a/docs/site/interfaces/interfaces_card.CardInterface.html +++ b/docs/interfaces/interfaces_card.CardInterface.html @@ -4,7 +4,7 @@
const card: CardInterface = new Card(Rank.Ace, Suit.Spades);
console.log(card.toString()); // "A of Spades"
-
interface CardInterface {
    getRank(): Rank;
    getSuit(): Suit;
    toObj(): {
        rank: Rank;
        suit: Suit;
    };
    toString(): string;
}

Implemented by

Methods

interface CardInterface {
    getRank(): Rank;
    getSuit(): Suit;
    toObj(): {
        rank: Rank;
        suit: Suit;
    };
    toString(): string;
}

Implemented by

Methods

getRank getSuit toObj toString @@ -14,22 +14,22 @@
const rank = card.getRank();
console.log(rank); // "A"
-
  • getSuit

    +
  • toObj

    Returns an object representation of the card, containing its rank and suit.

    Returns {
        rank: Rank;
        suit: Suit;
    }

    The card's rank and suit as an object.

    const cardObj = card.toObj();
    console.log(cardObj); // { rank: "A", suit: "Spades" }
    -
  • toString

    Returns a string representation of the card, displaying its rank and suit.

    Returns string

    The card's rank and suit as a formatted string.

    const description = card.toString();
    console.log(description); // "A of Spades"
    -
+
diff --git a/docs/site/interfaces/interfaces_casino.CasinoInterface.html b/docs/interfaces/interfaces_casino.CasinoInterface.html similarity index 99% rename from docs/site/interfaces/interfaces_casino.CasinoInterface.html rename to docs/interfaces/interfaces_casino.CasinoInterface.html index 3961d0a..bf53bf5 100644 --- a/docs/site/interfaces/interfaces_casino.CasinoInterface.html +++ b/docs/interfaces/interfaces_casino.CasinoInterface.html @@ -13,7 +13,7 @@
const casino: CasinoInterface = new Casino();
casino.on('casino:roomCreated', (room) => console.log(`Room created: ${room.name}`));
const room = casino.createRoom({ name: "Room1", tableSize: 6, smallBlind: 10, bigBlind: 20 });
console.log(casino.listRooms());
-
interface CasinoInterface {
    [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
    addListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    addRoom(room: PokerRoomInterface): PokerRoomInterface[];
    addRooms(rooms: PokerRoomInterface[]): PokerRoomInterface[];
    createRoom(config: PokerRoomConfig): PokerRoomInterface;
    deleteRoom(index: number): PokerRoomInterface[];
    emit<K>(eventName: string | symbol, ...args: AnyRest): boolean;
    eventNames(): (string | symbol)[];
    getMaxListeners(): number;
    getRoom(index: number): PokerRoomInterface;
    getRooms(): PokerRoomInterface[];
    isValidIndex(index: number): boolean;
    listenerCount<K>(eventName: string | symbol, listener?: Function): number;
    listeners<K>(eventName: string | symbol): Function[];
    off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    on<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    once<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependOnceListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    rawListeners<K>(eventName: string | symbol): Function[];
    removeAllListeners(eventName?: string | symbol): this;
    removeListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    roomCount(): number;
    setMaxListeners(n: number): this;
    setRooms(rooms: PokerRoomInterface[]): PokerRoomInterface[];
}

Hierarchy (view full)

Implemented by

interface CasinoInterface {
    [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
    addListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    addRoom(room: PokerRoomInterface): PokerRoomInterface[];
    addRooms(rooms: PokerRoomInterface[]): PokerRoomInterface[];
    createRoom(config: PokerRoomConfig): PokerRoomInterface;
    deleteRoom(index: number): PokerRoomInterface[];
    emit<K>(eventName: string | symbol, ...args: AnyRest): boolean;
    eventNames(): (string | symbol)[];
    getMaxListeners(): number;
    getRoom(index: number): PokerRoomInterface;
    getRooms(): PokerRoomInterface[];
    isValidIndex(index: number): boolean;
    listenerCount<K>(eventName: string | symbol, listener?: Function): number;
    listeners<K>(eventName: string | symbol): Function[];
    off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    on<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    once<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependOnceListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    rawListeners<K>(eventName: string | symbol): Function[];
    removeAllListeners(eventName?: string | symbol): this;
    removeListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    roomCount(): number;
    setMaxListeners(n: number): this;
    setRooms(rooms: PokerRoomInterface[]): PokerRoomInterface[];
}

Hierarchy (view full)

Implemented by

Methods

[captureRejectionSymbol]? addListener addRoom addRooms @@ -64,7 +64,7 @@
const casino = new Casino();
const room = new PokerRoom({ name: "HighRollers", tableSize: 6, smallBlind: 10, bigBlind: 20 });
const success = casino.addRoom(room);
console.log(success); // true
-
  • Adds a new PokerRoom instance to the Casino's list of managed rooms, enabling dynamic expansion +

  • Adds a new PokerRoom instance to the Casino's list of managed rooms, enabling dynamic expansion of rooms within the Casino environment.

    N/A

    N/A

    @@ -88,7 +88,7 @@
    const casino = new Casino();
    const room = new PokerRoom({ name: "HighRollers", tableSize: 6, smallBlind: 10, bigBlind: 20 });
    const success = casino.addRoom(room);
    console.log(success); // true
    -
  • Creates a new PokerRoom within the Casino and adds it to the list of rooms.

    Implements the createRoom method of CasinoInterface.

    N/A

    Enables the dynamic creation and addition of a PokerRoom to the Casino, expanding the Casino’s managed rooms as required. @@ -115,7 +115,7 @@

    const casino = new Casino();
    const room = casino.createRoom({ name: "HighRollers", tableSize: 6, smallBlind: 10, bigBlind: 20 });
    console.log(casino.getRooms()); // Logs the new room within the array of rooms
    -
  • Removes a PokerRoom from the Casino's list of managed rooms based on the room's name, enabling dynamic contraction of the Casino environment as required.

    N/A

    N/A

    @@ -143,7 +143,7 @@
    const casino = new Casino();
    casino.createRoom({ name: "HighRollers", tableSize: 6, smallBlind: 10, bigBlind: 20 });
    const success = casino.deleteRoom("HighRollers");
    console.log(success); // true if room was found and removed, false otherwise
    -
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

    Returns true if the event had listeners, false otherwise.

    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener @@ -158,7 +158,7 @@

    Returns (string | symbol)[]

    v6.0.0

  • Retrieves a specific PokerRoom based on its position within the Casino’s list of rooms.

    N/A

    N/A

    This method provides direct access to a single PokerRoom by index, allowing for targeted retrieval of rooms, @@ -184,7 +184,7 @@

    const casino = new Casino();
    const room = casino.getRoom(0); // Returns the first room or undefined if no rooms exist
    -
  • Retrieves the full list of rooms currently managed by the Casino.

    Implements the getRooms method of CasinoInterface.

    N/A

    Provides access to the Casino's list of rooms, allowing external components or systems to retrieve and display @@ -204,7 +204,7 @@

    const casino = new Casino();
    console.log(casino.getRooms()); // Output: []
    -
  • Validates if a specified index is within the valid bounds of the Casino’s room list.

    +
  • Validates if a specified index is within the valid bounds of the Casino’s room list.

    N/A

    N/A

    Prevents out-of-bounds errors by confirming that an index is within the acceptable range for the Casino’s @@ -232,7 +232,7 @@

    const casino = new Casino();
    try {
    casino.isValidIndex(2); // Returns true if index 2 exists in the list of rooms
    } catch (error) {
    console.error(error.message); // Logs error if index 2 is invalid
    }
    -
  • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      @@ -353,7 +353,7 @@
      const casino = new Casino();
      const count = casino.roomCount();
      console.log(count); // Logs the total number of managed rooms, e.g., 5
      -
  • By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    @@ -389,4 +389,4 @@
    const casino = new Casino();
    const rooms: PokerRoomInterface[] = [
    new PokerRoom({ name: "Room1", tableSize: 6, smallBlind: 10, bigBlind: 20 })
    ];
    casino.setRooms(rooms);
    console.log(casino.getRooms()); // Logs an array with the newly set rooms
    -
+
diff --git a/docs/site/interfaces/interfaces_deck.DeckInterface.html b/docs/interfaces/interfaces_deck.DeckInterface.html similarity index 99% rename from docs/site/interfaces/interfaces_deck.DeckInterface.html rename to docs/interfaces/interfaces_deck.DeckInterface.html index 8cdf213..1b02f26 100644 --- a/docs/site/interfaces/interfaces_deck.DeckInterface.html +++ b/docs/interfaces/interfaces_deck.DeckInterface.html @@ -4,7 +4,7 @@
const deck: DeckInterface = new Deck();
deck.shuffle();
const card = deck.draw();
console.log(card?.toString()); // "A of Spades"
-
interface DeckInterface {
    [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
    addListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    draw(): undefined | CardInterface;
    emit<K>(eventName: string | symbol, ...args: AnyRest): boolean;
    eventNames(): (string | symbol)[];
    getCards(): CardInterface[];
    getMaxListeners(): number;
    listenerCount<K>(eventName: string | symbol, listener?: Function): number;
    listeners<K>(eventName: string | symbol): Function[];
    off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    on<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    once<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependOnceListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    rawListeners<K>(eventName: string | symbol): Function[];
    removeAllListeners(eventName?: string | symbol): this;
    removeListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    setMaxListeners(n: number): this;
    shuffle(): void;
}

Hierarchy (view full)

Implemented by

interface DeckInterface {
    [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
    addListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    draw(): undefined | CardInterface;
    emit<K>(eventName: string | symbol, ...args: AnyRest): boolean;
    eventNames(): (string | symbol)[];
    getCards(): CardInterface[];
    getMaxListeners(): number;
    listenerCount<K>(eventName: string | symbol, listener?: Function): number;
    listeners<K>(eventName: string | symbol): Function[];
    off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    on<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    once<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependOnceListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    rawListeners<K>(eventName: string | symbol): Function[];
    removeAllListeners(eventName?: string | symbol): this;
    removeListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    setMaxListeners(n: number): this;
    shuffle(): void;
}

Hierarchy (view full)

Implemented by

Methods

[captureRejectionSymbol]? addListener draw emit @@ -31,7 +31,7 @@
const drawnCard = deck.draw();
console.log(drawnCard?.toString()); // "A of Spades"
-
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

    Returns true if the event had listeners, false otherwise.

    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener @@ -47,9 +47,9 @@
  • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      @@ -162,4 +162,4 @@

      Returns void

      const deck = new Deck();
      deck.shuffle();
      -
+
diff --git a/docs/site/interfaces/interfaces_logger.LoggerConfig.html b/docs/interfaces/interfaces_logger.LoggerConfig.html similarity index 97% rename from docs/site/interfaces/interfaces_logger.LoggerConfig.html rename to docs/interfaces/interfaces_logger.LoggerConfig.html index c4b8be4..e0591eb 100644 --- a/docs/site/interfaces/interfaces_logger.LoggerConfig.html +++ b/docs/interfaces/interfaces_logger.LoggerConfig.html @@ -9,8 +9,8 @@
const config: LoggerConfig = {
logDirPath: "./logs",
enableConsoleLogging: true
};
-
interface LoggerConfig {
    enableConsoleLogging?: boolean;
}
interface LoggerConfig {
    enableConsoleLogging?: boolean;
}

Properties

enableConsoleLogging?: boolean
const config: LoggerConfig = {
enableConsoleLogging: false
};
-
+
diff --git a/docs/site/interfaces/interfaces_logger.LoggerInterface.html b/docs/interfaces/interfaces_logger.LoggerInterface.html similarity index 99% rename from docs/site/interfaces/interfaces_logger.LoggerInterface.html rename to docs/interfaces/interfaces_logger.LoggerInterface.html index 1dbd9f6..3adf249 100644 --- a/docs/site/interfaces/interfaces_logger.LoggerInterface.html +++ b/docs/interfaces/interfaces_logger.LoggerInterface.html @@ -13,7 +13,7 @@
class MyLogger implements LoggerInterface {
async log(level: LogLevel, message: string, data?: Record<string, any>): Promise<void> {
// Implementation of log
}
}

const logger: LoggerInterface = new MyLogger();
logger.log("info", "Application started", { timestamp: new Date() });
-
interface LoggerInterface {
    log(level: LogLevel, message: string, data?: Record<string, any>): Promise<void>;
}

Implemented by

Methods

log +
interface LoggerInterface {
    log(level: LogLevel, message: string, data?: Record<string, any>): Promise<void>;
}

Implemented by

Methods

Methods

  • Logs a message with the specified level and optional additional data context. This method is asynchronous to allow for file I/O or remote logging without blocking the application.

    Standardizes the logging of messages, allowing for log levels and structured data. @@ -42,4 +42,4 @@

    logger.log("error", "Failed to connect to the database", { errorCode: "DB_CONN_ERR", timestamp: new Date() });
     
    -
+
diff --git a/docs/site/interfaces/interfaces_pokerGame.PokerGameConfig.html b/docs/interfaces/interfaces_pokerGame.PokerGameConfig.html similarity index 96% rename from docs/site/interfaces/interfaces_pokerGame.PokerGameConfig.html rename to docs/interfaces/interfaces_pokerGame.PokerGameConfig.html index 9440321..f836a12 100644 --- a/docs/site/interfaces/interfaces_pokerGame.PokerGameConfig.html +++ b/docs/interfaces/interfaces_pokerGame.PokerGameConfig.html @@ -1,7 +1,7 @@ PokerGameConfig | casinojs

PokerGameConfig Represents a Poker Game Config.

-
interface PokerGameConfig {
    bigBlind: number;
    id?: string;
    players: PokerPlayerInterface[];
    smallBlind: number;
}

Properties

interface PokerGameConfig {
    bigBlind: number;
    id?: string;
    players: PokerPlayerInterface[];
    smallBlind: number;
}

Properties

bigBlind: number
id?: string
smallBlind: number
+

Properties

bigBlind: number
id?: string
smallBlind: number
diff --git a/docs/site/interfaces/interfaces_pokerGame.PokerGameInterface.html b/docs/interfaces/interfaces_pokerGame.PokerGameInterface.html similarity index 99% rename from docs/site/interfaces/interfaces_pokerGame.PokerGameInterface.html rename to docs/interfaces/interfaces_pokerGame.PokerGameInterface.html index c9b05f9..aca0c26 100644 --- a/docs/site/interfaces/interfaces_pokerGame.PokerGameInterface.html +++ b/docs/interfaces/interfaces_pokerGame.PokerGameInterface.html @@ -1,7 +1,7 @@ PokerGameInterface | casinojs

PokerGameInterface Represents the current PokerGame being played at the PokerTable. Manages the deck, community cards, and game phases, such as pre-flop, flop, turn, and river.

-
interface PokerGameInterface {
    [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
    addListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    emit<K>(eventName: string | symbol, ...args: AnyRest): boolean;
    eventNames(): (string | symbol)[];
    getMaxListeners(): number;
    listenerCount<K>(eventName: string | symbol, listener?: Function): number;
    listeners<K>(eventName: string | symbol): Function[];
    off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    on<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    once<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependOnceListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    rawListeners<K>(eventName: string | symbol): Function[];
    removeAllListeners(eventName?: string | symbol): this;
    removeListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    setMaxListeners(n: number): this;
}

Hierarchy (view full)

Implemented by

Methods

interface PokerGameInterface {
    [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
    addListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    emit<K>(eventName: string | symbol, ...args: AnyRest): boolean;
    eventNames(): (string | symbol)[];
    getMaxListeners(): number;
    listenerCount<K>(eventName: string | symbol, listener?: Function): number;
    listeners<K>(eventName: string | symbol): Function[];
    off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    on<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    once<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependOnceListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    rawListeners<K>(eventName: string | symbol): Function[];
    removeAllListeners(eventName?: string | symbol): this;
    removeListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    setMaxListeners(n: number): this;
}

Hierarchy (view full)

Implemented by

Methods

Returns (string | symbol)[]

v6.0.0

Properties

bigBlindPos: number
communityCards?: CardInterface[]
dealerPos: number
pot?: number
smallBlindPos: number
diff --git a/docs/site/interfaces/interfaces_pokerPhase.PokerPhaseInterface.html b/docs/interfaces/interfaces_pokerPhase.PokerPhaseInterface.html similarity index 99% rename from docs/site/interfaces/interfaces_pokerPhase.PokerPhaseInterface.html rename to docs/interfaces/interfaces_pokerPhase.PokerPhaseInterface.html index e8c6f5d..c07fe83 100644 --- a/docs/site/interfaces/interfaces_pokerPhase.PokerPhaseInterface.html +++ b/docs/interfaces/interfaces_pokerPhase.PokerPhaseInterface.html @@ -1,7 +1,7 @@ PokerPhaseInterface | casinojs

PokerPhaseInterface Represents the current PokerPhase being played at the PokerTable. Manages the deck, community cards, and game phases, such as pre-flop, flop, turn, and river.

-
interface PokerPhaseInterface {
    [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
    addListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    emit<K>(eventName: string | symbol, ...args: AnyRest): boolean;
    eventNames(): (string | symbol)[];
    getMaxListeners(): number;
    listenerCount<K>(eventName: string | symbol, listener?: Function): number;
    listeners<K>(eventName: string | symbol): Function[];
    off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    on<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    once<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependOnceListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    rawListeners<K>(eventName: string | symbol): Function[];
    removeAllListeners(eventName?: string | symbol): this;
    removeListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    setMaxListeners(n: number): this;
}

Hierarchy (view full)

Implemented by

Methods

interface PokerPhaseInterface {
    [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
    addListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    emit<K>(eventName: string | symbol, ...args: AnyRest): boolean;
    eventNames(): (string | symbol)[];
    getMaxListeners(): number;
    listenerCount<K>(eventName: string | symbol, listener?: Function): number;
    listeners<K>(eventName: string | symbol): Function[];
    off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    on<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    once<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependOnceListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    rawListeners<K>(eventName: string | symbol): Function[];
    removeAllListeners(eventName?: string | symbol): this;
    removeListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    setMaxListeners(n: number): this;
}

Hierarchy (view full)

Implemented by

Methods

Returns (string | symbol)[]

v6.0.0

  • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      diff --git a/docs/site/interfaces/interfaces_pokerPlayer.PokerPlayerConfig.html b/docs/interfaces/interfaces_pokerPlayer.PokerPlayerConfig.html similarity index 98% rename from docs/site/interfaces/interfaces_pokerPlayer.PokerPlayerConfig.html rename to docs/interfaces/interfaces_pokerPlayer.PokerPlayerConfig.html index cac0c53..bf8fc2b 100644 --- a/docs/site/interfaces/interfaces_pokerPlayer.PokerPlayerConfig.html +++ b/docs/interfaces/interfaces_pokerPlayer.PokerPlayerConfig.html @@ -1,5 +1,5 @@ PokerPlayerConfig | casinojs

      PokerPlayerConfig Represents a PokerPlayer Config.

      -
      interface PokerPlayerConfig {
          id?: string;
          name?: string;
      }

      Properties

      id? +
      interface PokerPlayerConfig {
          id?: string;
          name?: string;
      }

      Properties

      Properties

      id?: string
      name?: string
      +

Properties

id?: string
name?: string
diff --git a/docs/site/interfaces/interfaces_pokerPlayer.PokerPlayerInterface.html b/docs/interfaces/interfaces_pokerPlayer.PokerPlayerInterface.html similarity index 99% rename from docs/site/interfaces/interfaces_pokerPlayer.PokerPlayerInterface.html rename to docs/interfaces/interfaces_pokerPlayer.PokerPlayerInterface.html index 4d46ace..f68dbdd 100644 --- a/docs/site/interfaces/interfaces_pokerPlayer.PokerPlayerInterface.html +++ b/docs/interfaces/interfaces_pokerPlayer.PokerPlayerInterface.html @@ -1,7 +1,7 @@ PokerPlayerInterface | casinojs

PokerPlayerInterface Represents a player seated at the PokerTable. The player can place bets, fold, and manage their chip stack during the game.

-
interface PokerPlayerInterface {
    [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
    addListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    bet(amount: number): boolean;
    emit<K>(eventName: string | symbol, ...args: AnyRest): boolean;
    eventNames(): (string | symbol)[];
    getId(): string;
    getMaxListeners(): number;
    listenerCount<K>(eventName: string | symbol, listener?: Function): number;
    listeners<K>(eventName: string | symbol): Function[];
    off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    on<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    once<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependOnceListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    rawListeners<K>(eventName: string | symbol): Function[];
    removeAllListeners(eventName?: string | symbol): this;
    removeListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    setIsFolded(bool: boolean): boolean;
    setMaxListeners(n: number): this;
}

Hierarchy (view full)

Implemented by

Methods

interface PokerPlayerInterface {
    [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
    addListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    bet(amount: number): boolean;
    emit<K>(eventName: string | symbol, ...args: AnyRest): boolean;
    eventNames(): (string | symbol)[];
    getId(): string;
    getMaxListeners(): number;
    listenerCount<K>(eventName: string | symbol, listener?: Function): number;
    listeners<K>(eventName: string | symbol): Function[];
    off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    on<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    once<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependOnceListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    rawListeners<K>(eventName: string | symbol): Function[];
    removeAllListeners(eventName?: string | symbol): this;
    removeListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    setIsFolded(bool: boolean): boolean;
    setMaxListeners(n: number): this;
}

Hierarchy (view full)

Implemented by

Methods

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

  • Alias for emitter.on(eventName, listener).

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v0.1.26

    -
  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

    Returns true if the event had listeners, false otherwise.

    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener @@ -41,9 +41,9 @@
    const rank = card.getRank();
    console.log(rank); // "A"
    -
  • Retrieves the maximum number of listeners allowed for this instance.

    +
  • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      @@ -145,7 +145,7 @@

      Returns a reference to the EventEmitter, so that calls can be chained.

      Type Parameters

      • K

      Parameters

      • eventName: string | symbol
      • listener: ((...args: any[]) => void)
          • (...args): void
          • Parameters

            • Rest...args: any[]

            Returns void

      Returns this

      v0.1.26

      -
  • By default EventEmitters will print a warning if more than 10 listeners are +

  • By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    diff --git a/docs/site/interfaces/interfaces_pokerRoom.PokerRoomConfig.html b/docs/interfaces/interfaces_pokerRoom.PokerRoomConfig.html similarity index 97% rename from docs/site/interfaces/interfaces_pokerRoom.PokerRoomConfig.html rename to docs/interfaces/interfaces_pokerRoom.PokerRoomConfig.html index ca7be99..3c7fdcd 100644 --- a/docs/site/interfaces/interfaces_pokerRoom.PokerRoomConfig.html +++ b/docs/interfaces/interfaces_pokerRoom.PokerRoomConfig.html @@ -21,16 +21,16 @@
    const roomConfig: PokerRoomConfig = {
    id: "room42",
    name: "High Stakes",
    tableConfigs: [
    { tableSize: 6, smallBlind: 50, bigBlind: 100 },
    { tableSize: 8, smallBlind: 100, bigBlind: 200 }
    ]
    };
    const pokerRoom = new PokerRoom(roomConfig); // Initializes a new PokerRoom with the specified configuration
    -
interface PokerRoomConfig {
    id?: string;
    name?: string;
    tableConfigs?: PokerTableConfig[];
}

Properties

id? +
interface PokerRoomConfig {
    id?: string;
    name?: string;
    tableConfigs?: PokerTableConfig[];
}

Properties

id?: string
const roomConfig: PokerRoomConfig = {
id: "room1",
name: "High Rollers",
tableConfigs: [{ tableSize: 6, smallBlind: 10, bigBlind: 20 }]
};
console.log(roomConfig.id);

// Output: "room1"
-
name?: string
const roomConfig: PokerRoomConfig = {
id: "room2",
name: "VIP Suite",
tableConfigs: [{ tableSize: 8, smallBlind: 50, bigBlind: 100 }]
};
console.log(roomConfig.name);

// Output: "VIP Suite" +
name?: string
const roomConfig: PokerRoomConfig = {
id: "room2",
name: "VIP Suite",
tableConfigs: [{ tableSize: 8, smallBlind: 50, bigBlind: 100 }]
};
console.log(roomConfig.name);

// Output: "VIP Suite"
-
tableConfigs?: PokerTableConfig[]
const roomConfig: PokerRoomConfig = {
id: "room3",
name: "Beginner's Lounge",
tableConfigs: [
{ tableSize: 4, smallBlind: 5, bigBlind: 10 },
{ tableSize: 6, smallBlind: 10, bigBlind: 20 }
]
};
console.log(roomConfig.tableConfigs);
// Output: [{ tableSize: 4, smallBlind: 5, bigBlind: 10 }, { tableSize: 6, smallBlind: 10, bigBlind: 20 }] +
tableConfigs?: PokerTableConfig[]
const roomConfig: PokerRoomConfig = {
id: "room3",
name: "Beginner's Lounge",
tableConfigs: [
{ tableSize: 4, smallBlind: 5, bigBlind: 10 },
{ tableSize: 6, smallBlind: 10, bigBlind: 20 }
]
};
console.log(roomConfig.tableConfigs);
// Output: [{ tableSize: 4, smallBlind: 5, bigBlind: 10 }, { tableSize: 6, smallBlind: 10, bigBlind: 20 }]
-
+
diff --git a/docs/site/interfaces/interfaces_pokerRoom.PokerRoomInterface.html b/docs/interfaces/interfaces_pokerRoom.PokerRoomInterface.html similarity index 99% rename from docs/site/interfaces/interfaces_pokerRoom.PokerRoomInterface.html rename to docs/interfaces/interfaces_pokerRoom.PokerRoomInterface.html index 744dc56..3e68072 100644 --- a/docs/site/interfaces/interfaces_pokerRoom.PokerRoomInterface.html +++ b/docs/interfaces/interfaces_pokerRoom.PokerRoomInterface.html @@ -22,7 +22,7 @@
const pokerRoom: PokerRoomInterface = new PokerRoom();
pokerRoom.on('roomUpdated', () => console.log(`Room updated with new settings`));
pokerRoom.setName("HighRollers");
console.log(pokerRoom.getName()); // Logs "HighRollers"
-
interface PokerRoomInterface {
    [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
    addListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    emit<K>(eventName: string | symbol, ...args: AnyRest): boolean;
    eventNames(): (string | symbol)[];
    getId(): string;
    getMaxListeners(): number;
    getName(): string;
    getTables(): PokerTableInterface[];
    isValidIndex(index: number): boolean;
    listenerCount<K>(eventName: string | symbol, listener?: Function): number;
    listeners<K>(eventName: string | symbol): Function[];
    off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    on<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    once<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependOnceListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    rawListeners<K>(eventName: string | symbol): Function[];
    removeAllListeners(eventName?: string | symbol): this;
    removeListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    setMaxListeners(n: number): this;
    setName(name: string): string;
    setTables(tables: PokerTableInterface[]): PokerTableInterface[];
    tableCount(): number;
}

Hierarchy (view full)

Implemented by

interface PokerRoomInterface {
    [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
    addListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    emit<K>(eventName: string | symbol, ...args: AnyRest): boolean;
    eventNames(): (string | symbol)[];
    getId(): string;
    getMaxListeners(): number;
    getName(): string;
    getTables(): PokerTableInterface[];
    isValidIndex(index: number): boolean;
    listenerCount<K>(eventName: string | symbol, listener?: Function): number;
    listeners<K>(eventName: string | symbol): Function[];
    off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    on<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    once<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependOnceListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    rawListeners<K>(eventName: string | symbol): Function[];
    removeAllListeners(eventName?: string | symbol): this;
    removeListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    setMaxListeners(n: number): this;
    setName(name: string): string;
    setTables(tables: PokerTableInterface[]): PokerTableInterface[];
    tableCount(): number;
}

Hierarchy (view full)

Implemented by

Methods

[captureRejectionSymbol]? addListener emit eventNames @@ -79,9 +79,9 @@
const pokerRoom = new PokerRoom({ id: "Room123", name: "VIP Room", tableSize: 6 });
console.log(pokerRoom.getId()); // Logs "Room123"
-
  • Retrieves the maximum number of listeners allowed for this instance.

    +
  • Retrieves the current name of the PokerRoom.

    N/A - This method is defined within PokerRoomInterface and is implemented by any class adhering to this interface.

    N/A - This method does not override any superclass or parent methods.

    The getName method enables access to the current name of a PokerRoom, which can be essential for @@ -100,7 +100,7 @@

    const pokerRoom = new PokerRoom({ name: "VIP Room", tableSize: 6 });
    console.log(pokerRoom.getName()); // Logs "VIP Room"
    -
  • Retrieves the associated PokerTable instance within the PokerRoom.

    N/A - This method does not implement external interfaces.

    N/A - This method does not override any superclass or parent methods.

    The getTable method provides access to the PokerTable instance that is actively managed by the PokerRoom. @@ -119,7 +119,7 @@

    const pokerRoom = new PokerRoom({ name: "High Stakes", tableSize: 6 });
    const table = pokerRoom.getTable();
    console.log(table); // Logs the PokerTable instance associated with "High Stakes" room
    -
  • Validates if a specified index is within the valid bounds of the Casino’s room list.

    N/A

    N/A

    Prevents out-of-bounds errors by confirming that an index is within the acceptable range for the Casino’s @@ -147,7 +147,7 @@

    const casino = new Casino();
    try {
    casino.isValidIndex(2); // Returns true if index 2 exists in the list of rooms
    } catch (error) {
    console.error(error.message); // Logs error if index 2 is invalid
    }
    -
  • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      @@ -281,7 +281,7 @@
      const pokerRoom = new PokerRoom({ name: "Room1", tableSize: 6 });
      pokerRoom.setName("HighRollers"); // Sets the name of the room to "HighRollers"
      console.log(pokerRoom.getName()); // Logs "HighRollers"
      -
  • Sets the configuration for multiple tables within the PokerRoom. Each table configuration specifies key attributes like table size, small blind, and big blind values, supporting multi-table configurations within a single room.

    N/A - This method is part of the PokerRoomInterface and does not implement any external methods.

    @@ -310,7 +310,7 @@
    const pokerRoom = new PokerRoom({ name: "Room3", tableSize: 8 });
    const tableConfigs = [
    new PokerTable({ tableSize: 8, smallBlind: 10, bigBlind: 20 }),
    new PokerTable({ tableSize: 10, smallBlind: 20, bigBlind: 40 })
    ];
    pokerRoom.setTables(tableConfigs); // Sets multiple table configurations in the room
    console.log(pokerRoom.getTables()); // Logs the table configurations
    -
  • Retrieves the total number of PokerRoom instances currently managed by the Casino.

    N/A

    N/A

    This method provides insight into the number of poker rooms that the Casino manages, supporting @@ -329,4 +329,4 @@

    const casino = new Casino();
    const count = casino.roomCount();
    console.log(count); // Logs the total number of managed rooms, e.g., 5
    -
+
diff --git a/docs/site/interfaces/interfaces_pokerSeat.PokerSeatConfig.html b/docs/interfaces/interfaces_pokerSeat.PokerSeatConfig.html similarity index 96% rename from docs/site/interfaces/interfaces_pokerSeat.PokerSeatConfig.html rename to docs/interfaces/interfaces_pokerSeat.PokerSeatConfig.html index 5d8a41d..bde352f 100644 --- a/docs/site/interfaces/interfaces_pokerSeat.PokerSeatConfig.html +++ b/docs/interfaces/interfaces_pokerSeat.PokerSeatConfig.html @@ -1,7 +1,7 @@ PokerSeatConfig | casinojs

PokerSeatConfig Represents a PokerTable Config.

-
interface PokerSeatConfig {
    id?: string;
    isDealer?: boolean;
    player?: PokerPlayerInterface;
    position: number;
}

Properties

id? +
interface PokerSeatConfig {
    id?: string;
    isDealer?: boolean;
    player?: PokerPlayerInterface;
    position: number;
}

Properties

id?: string
isDealer?: boolean
position: number
+

Properties

id?: string
isDealer?: boolean
position: number
diff --git a/docs/site/interfaces/interfaces_pokerSeat.PokerSeatInterface.html b/docs/interfaces/interfaces_pokerSeat.PokerSeatInterface.html similarity index 99% rename from docs/site/interfaces/interfaces_pokerSeat.PokerSeatInterface.html rename to docs/interfaces/interfaces_pokerSeat.PokerSeatInterface.html index 7cdbe85..91fe062 100644 --- a/docs/site/interfaces/interfaces_pokerSeat.PokerSeatInterface.html +++ b/docs/interfaces/interfaces_pokerSeat.PokerSeatInterface.html @@ -2,7 +2,7 @@ Represents a PokerTable within a PokerRoom. The PokerTable manages player seats, tracks the dealer, small blind, and big blind positions, and handles the start and stop of the PokerGame.

-
interface PokerSeatInterface {
    [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
    addListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    emit<K>(eventName: string | symbol, ...args: AnyRest): boolean;
    eventNames(): (string | symbol)[];
    getId(): string;
    getMaxListeners(): number;
    getPlayer(): undefined | PokerPlayerInterface;
    getPosition(): number;
    isDealer(): boolean;
    isOccupied(): boolean;
    listenerCount<K>(eventName: string | symbol, listener?: Function): number;
    listeners<K>(eventName: string | symbol): Function[];
    occupy(player: PokerPlayerInterface): void;
    off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    on<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    once<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependOnceListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    rawListeners<K>(eventName: string | symbol): Function[];
    removeAllListeners(eventName?: string | symbol): this;
    removeListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    setDealer(bool: boolean): boolean;
    setMaxListeners(n: number): this;
    vacate(): void;
}

Hierarchy (view full)

Implemented by

Methods

interface PokerSeatInterface {
    [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
    addListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    emit<K>(eventName: string | symbol, ...args: AnyRest): boolean;
    eventNames(): (string | symbol)[];
    getId(): string;
    getMaxListeners(): number;
    getPlayer(): undefined | PokerPlayerInterface;
    getPosition(): number;
    isDealer(): boolean;
    isOccupied(): boolean;
    listenerCount<K>(eventName: string | symbol, listener?: Function): number;
    listeners<K>(eventName: string | symbol): Function[];
    occupy(player: PokerPlayerInterface): void;
    off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    on<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    once<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependOnceListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    rawListeners<K>(eventName: string | symbol): Function[];
    removeAllListeners(eventName?: string | symbol): this;
    removeListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    setDealer(bool: boolean): boolean;
    setMaxListeners(n: number): this;
    vacate(): void;
}

Hierarchy (view full)

Implemented by

Methods

[captureRejectionSymbol]? addListener emit eventNames @@ -47,30 +47,30 @@
const rank = card.getRank();
console.log(rank); // "A"
-
  • Retrieves the maximum number of listeners allowed for this instance.

    +
  • getPosition

    +
  • getPosition

    Returns the poker table's id.

    Returns number

    The poker table's id.

    const rank = card.getRank();
    console.log(rank); // "A"
    -
  • isDealer

    Returns the poker table's id.

    Returns boolean

    The poker table's id.

    const rank = card.getRank();
    console.log(rank); // "A"
    -
  • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      @@ -81,7 +81,7 @@

      Type Parameters

      • K

      Parameters

      • eventName: string | symbol

      Returns Function[]

      v0.1.26

      -
  • Alias for emitter.removeListener().

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns this

    v10.0.0

  • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already @@ -178,10 +178,10 @@

    const rank = card.getRank();
    console.log(rank); // "A"
    -
  • By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    Returns a reference to the EventEmitter, so that calls can be chained.

    Parameters

    • n: number

    Returns this

    v0.3.5

    -
+
diff --git a/docs/site/interfaces/interfaces_pokerTable.PokerTableConfig.html b/docs/interfaces/interfaces_pokerTable.PokerTableConfig.html similarity index 97% rename from docs/site/interfaces/interfaces_pokerTable.PokerTableConfig.html rename to docs/interfaces/interfaces_pokerTable.PokerTableConfig.html index 3117df1..2ebe6b0 100644 --- a/docs/site/interfaces/interfaces_pokerTable.PokerTableConfig.html +++ b/docs/interfaces/interfaces_pokerTable.PokerTableConfig.html @@ -19,7 +19,7 @@
const tableConfig: PokerTableConfig = {
id: "table1",
name: "VIP Table",
size: 8,
smallBlind: 50
};
-
interface PokerTableConfig {
    id?: string;
    name?: string;
    size?: number;
    smallBlind?: number;
}

Properties

id? +
interface PokerTableConfig {
    id?: string;
    name?: string;
    size?: number;
    smallBlind?: number;
}

Properties

id? name? size? smallBlind? @@ -31,13 +31,13 @@
const tableConfig: PokerTableConfig = {
id: undefined,
name: "Standard Table",
size: 4,
smallBlind: 10
};
console.log(tableConfig.id);
// Console Output: undefined
-
name?: string
const tableConfig: PokerTableConfig = {
id: "table2",
name: "VIP Suite",
size: 8,
smallBlind: 50
};
console.log(tableConfig.name);
// Console Output: "VIP Suite" +
name?: string
const tableConfig: PokerTableConfig = {
id: "table2",
name: "VIP Suite",
size: 8,
smallBlind: 50
};
console.log(tableConfig.name);
// Console Output: "VIP Suite"
-
size?: number
const tableConfig: PokerTableConfig = {
id: "table3",
name: "Standard Table",
size: 6,
smallBlind: 10
};
console.log(tableConfig.size);
// Console Output: 6 +
size?: number
const tableConfig: PokerTableConfig = {
id: "table3",
name: "Standard Table",
size: 6,
smallBlind: 10
};
console.log(tableConfig.size);
// Console Output: 6
-
smallBlind?: number
const tableConfig: PokerTableConfig = {
id: "table4",
name: "Training Table",
size: 4,
smallBlind: 5
};
console.log(tableConfig.smallBlind);
// Console Output: 5 +
smallBlind?: number
const tableConfig: PokerTableConfig = {
id: "table4",
name: "Training Table",
size: 4,
smallBlind: 5
};
console.log(tableConfig.smallBlind);
// Console Output: 5
-
+
diff --git a/docs/site/interfaces/interfaces_pokerTable.PokerTableInterface.html b/docs/interfaces/interfaces_pokerTable.PokerTableInterface.html similarity index 99% rename from docs/site/interfaces/interfaces_pokerTable.PokerTableInterface.html rename to docs/interfaces/interfaces_pokerTable.PokerTableInterface.html index 9775d9c..923354b 100644 --- a/docs/site/interfaces/interfaces_pokerTable.PokerTableInterface.html +++ b/docs/interfaces/interfaces_pokerTable.PokerTableInterface.html @@ -2,7 +2,7 @@ Represents a PokerTable within a PokerRoom. The PokerTable manages player seats, tracks the dealer, small blind, and big blind positions, and handles the start and stop of the PokerGame.

-
interface PokerTableInterface {
    [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
    addListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    emit<K>(eventName: string | symbol, ...args: AnyRest): boolean;
    eventNames(): (string | symbol)[];
    getId(): string;
    getMaxListeners(): number;
    getSeats(): PokerSeatInterface[];
    isValidIndex(index: number): boolean;
    listenerCount<K>(eventName: string | symbol, listener?: Function): number;
    listeners<K>(eventName: string | symbol): Function[];
    off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    on<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    once<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependOnceListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    rawListeners<K>(eventName: string | symbol): Function[];
    removeAllListeners(eventName?: string | symbol): this;
    removeListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    seatCount(): number;
    setMaxListeners(n: number): this;
    setName(name: string): string;
}

Hierarchy (view full)

Implemented by

Methods

interface PokerTableInterface {
    [captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: AnyRest): void;
    addListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    emit<K>(eventName: string | symbol, ...args: AnyRest): boolean;
    eventNames(): (string | symbol)[];
    getId(): string;
    getMaxListeners(): number;
    getSeats(): PokerSeatInterface[];
    isValidIndex(index: number): boolean;
    listenerCount<K>(eventName: string | symbol, listener?: Function): number;
    listeners<K>(eventName: string | symbol): Function[];
    off<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    on<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    once<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    prependOnceListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    rawListeners<K>(eventName: string | symbol): Function[];
    removeAllListeners(eventName?: string | symbol): this;
    removeListener<K>(eventName: string | symbol, listener: ((...args: any[]) => void)): this;
    seatCount(): number;
    setMaxListeners(n: number): this;
    setName(name: string): string;
}

Hierarchy (view full)

Implemented by

Methods

[captureRejectionSymbol]? addListener emit eventNames @@ -44,12 +44,12 @@
const rank = card.getRank();
console.log(rank); // "A"
-
  • Retrieves the maximum number of listeners allowed for this instance.

    +
  • Validates if a specified index is within the valid bounds of the Casino’s room list.

    N/A

    N/A

    Prevents out-of-bounds errors by confirming that an index is within the acceptable range for the Casino’s @@ -77,7 +77,7 @@

    const casino = new Casino();
    try {
    casino.isValidIndex(2); // Returns true if index 2 exists in the list of rooms
    } catch (error) {
    console.error(error.message); // Logs error if index 2 is invalid
    }
    -
  • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      @@ -198,7 +198,7 @@
      const casino = new Casino();
      const count = casino.roomCount();
      console.log(count); // Logs the total number of managed rooms, e.g., 5
      -
  • By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    @@ -230,4 +230,4 @@
    const pokerRoom = new PokerRoom({ name: "Room1", tableSize: 6 });
    pokerRoom.setName("HighRollers"); // Sets the name of the room to "HighRollers"
    console.log(pokerRoom.getName()); // Logs "HighRollers"
    -
+
diff --git a/docs/CONTRIBUTING.md b/docs/media/CONTRIBUTING.md similarity index 100% rename from docs/CONTRIBUTING.md rename to docs/media/CONTRIBUTING.md diff --git a/docs/site/modules.html b/docs/modules.html similarity index 100% rename from docs/site/modules.html rename to docs/modules.html diff --git a/docs/site/modules/enums.html b/docs/modules/enums.html similarity index 99% rename from docs/site/modules/enums.html rename to docs/modules/enums.html index b04c5c0..2507560 100644 --- a/docs/site/modules/enums.html +++ b/docs/modules/enums.html @@ -1,7 +1,7 @@ enums | casinojs

Module enums

// Import all enums from the centralized module
import { CasinoEventName, CasinoEventNamesEnum, PokerPhaseName, PokerPhasesEnum, Rank, RanksEnum, Suit, SuitsEnum } from './enums';
-

References

References

CasinoEvents CasinoEventsEnumModule DeckEvents DeckEventsEnumModule diff --git a/docs/site/modules/enums_events.html b/docs/modules/enums_events.html similarity index 99% rename from docs/site/modules/enums_events.html rename to docs/modules/enums_events.html index f683081..60e5754 100644 --- a/docs/site/modules/enums_events.html +++ b/docs/modules/enums_events.html @@ -1,7 +1,7 @@ enums/events | casinojs

Module enums/events

// Import all enums from the centralized module
import { CasinoEvents, CasinoEventsEnumModule } from './enums';
-

References

References

CasinoEvents CasinoEventsEnumModule DeckEvents DeckEventsEnumModule diff --git a/docs/site/modules/enums_events_casino.html b/docs/modules/enums_events_casino.html similarity index 98% rename from docs/site/modules/enums_events_casino.html rename to docs/modules/enums_events_casino.html index d421433..278bc8a 100644 --- a/docs/site/modules/enums_events_casino.html +++ b/docs/modules/enums_events_casino.html @@ -1,2 +1,2 @@ -enums/events/casino | casinojs

Module enums/events/casino

Index

Enumerations

CasinoEvents +enums/events/casino | casinojs

Module enums/events/casino

Index

Enumerations

diff --git a/docs/site/modules/enums_events_deck.html b/docs/modules/enums_events_deck.html similarity index 98% rename from docs/site/modules/enums_events_deck.html rename to docs/modules/enums_events_deck.html index 7cbce18..905ce34 100644 --- a/docs/site/modules/enums_events_deck.html +++ b/docs/modules/enums_events_deck.html @@ -1,2 +1,2 @@ -enums/events/deck | casinojs

Module enums/events/deck

Index

Enumerations

DeckEvents +enums/events/deck | casinojs

Module enums/events/deck

Index

Enumerations

diff --git a/docs/site/modules/enums_events_pokerGame.html b/docs/modules/enums_events_pokerGame.html similarity index 97% rename from docs/site/modules/enums_events_pokerGame.html rename to docs/modules/enums_events_pokerGame.html index 0686f81..cdbc7e0 100644 --- a/docs/site/modules/enums_events_pokerGame.html +++ b/docs/modules/enums_events_pokerGame.html @@ -1,2 +1,2 @@ -enums/events/pokerGame | casinojs

Module enums/events/pokerGame

Index

Enumerations

PokerGameEvents +enums/events/pokerGame | casinojs

Module enums/events/pokerGame

Index

Enumerations

diff --git a/docs/site/modules/enums_events_pokerPhase.html b/docs/modules/enums_events_pokerPhase.html similarity index 97% rename from docs/site/modules/enums_events_pokerPhase.html rename to docs/modules/enums_events_pokerPhase.html index 7b24d44..45065dd 100644 --- a/docs/site/modules/enums_events_pokerPhase.html +++ b/docs/modules/enums_events_pokerPhase.html @@ -1,2 +1,2 @@ -enums/events/pokerPhase | casinojs

Module enums/events/pokerPhase

Index

Enumerations

PokerPhaseEvents +enums/events/pokerPhase | casinojs

Module enums/events/pokerPhase

Index

Enumerations

diff --git a/docs/site/modules/enums_events_pokerPlayer.html b/docs/modules/enums_events_pokerPlayer.html similarity index 97% rename from docs/site/modules/enums_events_pokerPlayer.html rename to docs/modules/enums_events_pokerPlayer.html index c666536..e8fbaf6 100644 --- a/docs/site/modules/enums_events_pokerPlayer.html +++ b/docs/modules/enums_events_pokerPlayer.html @@ -1,2 +1,2 @@ -enums/events/pokerPlayer | casinojs

Module enums/events/pokerPlayer

Index

Enumerations

PokerPlayerEvents +enums/events/pokerPlayer | casinojs

Module enums/events/pokerPlayer

Index

Enumerations

diff --git a/docs/site/modules/enums_events_pokerRoom.html b/docs/modules/enums_events_pokerRoom.html similarity index 97% rename from docs/site/modules/enums_events_pokerRoom.html rename to docs/modules/enums_events_pokerRoom.html index c8cf2ce..91f1e92 100644 --- a/docs/site/modules/enums_events_pokerRoom.html +++ b/docs/modules/enums_events_pokerRoom.html @@ -1,2 +1,2 @@ -enums/events/pokerRoom | casinojs

Module enums/events/pokerRoom

Index

Enumerations

PokerRoomEvents +enums/events/pokerRoom | casinojs

Module enums/events/pokerRoom

Index

Enumerations

diff --git a/docs/site/modules/enums_events_pokerSeat.html b/docs/modules/enums_events_pokerSeat.html similarity index 97% rename from docs/site/modules/enums_events_pokerSeat.html rename to docs/modules/enums_events_pokerSeat.html index 0c45511..da8810a 100644 --- a/docs/site/modules/enums_events_pokerSeat.html +++ b/docs/modules/enums_events_pokerSeat.html @@ -1,2 +1,2 @@ -enums/events/pokerSeat | casinojs

Module enums/events/pokerSeat

Index

Enumerations

PokerSeatEvents +enums/events/pokerSeat | casinojs

Module enums/events/pokerSeat

Index

Enumerations

diff --git a/docs/site/modules/enums_events_pokerTable.html b/docs/modules/enums_events_pokerTable.html similarity index 97% rename from docs/site/modules/enums_events_pokerTable.html rename to docs/modules/enums_events_pokerTable.html index 7e35dca..cba5233 100644 --- a/docs/site/modules/enums_events_pokerTable.html +++ b/docs/modules/enums_events_pokerTable.html @@ -1,2 +1,2 @@ -enums/events/pokerTable | casinojs

Module enums/events/pokerTable

Index

Enumerations

PokerTableEvents +enums/events/pokerTable | casinojs

Module enums/events/pokerTable

Index

Enumerations

diff --git a/docs/site/modules/enums_logLevels.html b/docs/modules/enums_logLevels.html similarity index 97% rename from docs/site/modules/enums_logLevels.html rename to docs/modules/enums_logLevels.html index 6abfc9a..f313dde 100644 --- a/docs/site/modules/enums_logLevels.html +++ b/docs/modules/enums_logLevels.html @@ -1,2 +1,2 @@ -enums/logLevels | casinojs

Module enums/logLevels

Index

Enumerations

LogLevel +enums/logLevels | casinojs

Module enums/logLevels

Index

Enumerations

diff --git a/docs/site/modules/enums_pokerPhases.html b/docs/modules/enums_pokerPhases.html similarity index 98% rename from docs/site/modules/enums_pokerPhases.html rename to docs/modules/enums_pokerPhases.html index bd9b38c..1f76696 100644 --- a/docs/site/modules/enums_pokerPhases.html +++ b/docs/modules/enums_pokerPhases.html @@ -1,2 +1,2 @@ -enums/pokerPhases | casinojs

Module enums/pokerPhases

Index

Enumerations

PokerPhases +enums/pokerPhases | casinojs

Module enums/pokerPhases

Index

Enumerations

diff --git a/docs/site/modules/enums_ranks.html b/docs/modules/enums_ranks.html similarity index 97% rename from docs/site/modules/enums_ranks.html rename to docs/modules/enums_ranks.html index 819e3d7..3819f7f 100644 --- a/docs/site/modules/enums_ranks.html +++ b/docs/modules/enums_ranks.html @@ -1,2 +1,2 @@ -enums/ranks | casinojs

Module enums/ranks

Index

Enumerations

Rank +enums/ranks | casinojs

Module enums/ranks

Index

Enumerations

diff --git a/docs/site/modules/enums_sources.html b/docs/modules/enums_sources.html similarity index 97% rename from docs/site/modules/enums_sources.html rename to docs/modules/enums_sources.html index 2475fde..907aff8 100644 --- a/docs/site/modules/enums_sources.html +++ b/docs/modules/enums_sources.html @@ -1,2 +1,2 @@ -enums/sources | casinojs

Module enums/sources

Index

Enumerations

Source +enums/sources | casinojs

Module enums/sources

Index

Enumerations

diff --git a/docs/site/modules/enums_suits.html b/docs/modules/enums_suits.html similarity index 97% rename from docs/site/modules/enums_suits.html rename to docs/modules/enums_suits.html index df1d4e2..b7ff291 100644 --- a/docs/site/modules/enums_suits.html +++ b/docs/modules/enums_suits.html @@ -1,2 +1,2 @@ -enums/suits | casinojs

Module enums/suits

Index

Enumerations

Suit +enums/suits | casinojs

Module enums/suits

Index

Enumerations

diff --git a/docs/site/modules/index.html b/docs/modules/index.html similarity index 99% rename from docs/site/modules/index.html rename to docs/modules/index.html index 58761a0..00f0055 100644 --- a/docs/site/modules/index.html +++ b/docs/modules/index.html @@ -1,7 +1,7 @@ index | casinojs

Module index

// Importing from the centralized library module
import { CardInterface, Card, Deck, Rank, Suit } from 'pokerjs';

const deck = new Deck();
deck.shuffle();
const card = deck.draw();
console.log(card?.toString());
-

References

References

BaseEventEmitter BaseEventEmitterInterface BaseEventInterface BaseEventInterfaceModule diff --git a/docs/site/modules/interfaces.html b/docs/modules/interfaces.html similarity index 99% rename from docs/site/modules/interfaces.html rename to docs/modules/interfaces.html index 92a2743..58479a8 100644 --- a/docs/site/modules/interfaces.html +++ b/docs/modules/interfaces.html @@ -1,7 +1,7 @@ interfaces | casinojs

Module interfaces

// Import all interfaces and types from the centralized module
import { CardInterface, DeckInterface } from './interfaces';
-

References

BaseEventEmitterInterface BaseEventInterface BaseEventInterfaceModule BaseInterfaceModule diff --git a/docs/site/modules/interfaces__base.html b/docs/modules/interfaces__base.html similarity index 98% rename from docs/site/modules/interfaces__base.html rename to docs/modules/interfaces__base.html index 1c20411..c57c856 100644 --- a/docs/site/modules/interfaces__base.html +++ b/docs/modules/interfaces__base.html @@ -1,2 +1,2 @@ -interfaces/_base | casinojs

Module interfaces/_base

Index

Interfaces

BaseEventEmitterInterface +interfaces/_base | casinojs
diff --git a/docs/site/modules/interfaces_baseEvent.html b/docs/modules/interfaces_baseEvent.html similarity index 98% rename from docs/site/modules/interfaces_baseEvent.html rename to docs/modules/interfaces_baseEvent.html index f4c9c31..951fde7 100644 --- a/docs/site/modules/interfaces_baseEvent.html +++ b/docs/modules/interfaces_baseEvent.html @@ -1,2 +1,2 @@ -interfaces/baseEvent | casinojs

Module interfaces/baseEvent

Index

Interfaces

BaseEventInterface +interfaces/baseEvent | casinojs

Module interfaces/baseEvent

Index

Interfaces

diff --git a/docs/site/modules/interfaces_card.html b/docs/modules/interfaces_card.html similarity index 97% rename from docs/site/modules/interfaces_card.html rename to docs/modules/interfaces_card.html index ae4b799..4b59b57 100644 --- a/docs/site/modules/interfaces_card.html +++ b/docs/modules/interfaces_card.html @@ -1,3 +1,3 @@ -interfaces/card | casinojs

Module interfaces/card

Index

Interfaces

CardConfig +interfaces/card | casinojs
diff --git a/docs/site/modules/interfaces_casino.html b/docs/modules/interfaces_casino.html similarity index 98% rename from docs/site/modules/interfaces_casino.html rename to docs/modules/interfaces_casino.html index a51d33b..8b3a3f7 100644 --- a/docs/site/modules/interfaces_casino.html +++ b/docs/modules/interfaces_casino.html @@ -1,2 +1,2 @@ -interfaces/casino | casinojs

Module interfaces/casino

Index

Interfaces

CasinoInterface +interfaces/casino | casinojs

Module interfaces/casino

Index

Interfaces

diff --git a/docs/site/modules/interfaces_deck.html b/docs/modules/interfaces_deck.html similarity index 97% rename from docs/site/modules/interfaces_deck.html rename to docs/modules/interfaces_deck.html index f88be8a..b16bfe3 100644 --- a/docs/site/modules/interfaces_deck.html +++ b/docs/modules/interfaces_deck.html @@ -1,2 +1,2 @@ -interfaces/deck | casinojs

Module interfaces/deck

Index

Interfaces

DeckInterface +interfaces/deck | casinojs

Module interfaces/deck

Index

Interfaces

diff --git a/docs/site/modules/interfaces_logger.html b/docs/modules/interfaces_logger.html similarity index 98% rename from docs/site/modules/interfaces_logger.html rename to docs/modules/interfaces_logger.html index 4b6774b..3ed0397 100644 --- a/docs/site/modules/interfaces_logger.html +++ b/docs/modules/interfaces_logger.html @@ -1,3 +1,3 @@ -interfaces/logger | casinojs

Module interfaces/logger

Index

Interfaces

LoggerConfig +interfaces/logger | casinojs
diff --git a/docs/site/modules/interfaces_pokerGame.html b/docs/modules/interfaces_pokerGame.html similarity index 98% rename from docs/site/modules/interfaces_pokerGame.html rename to docs/modules/interfaces_pokerGame.html index e89768d..c1449ae 100644 --- a/docs/site/modules/interfaces_pokerGame.html +++ b/docs/modules/interfaces_pokerGame.html @@ -1,3 +1,3 @@ -interfaces/pokerGame | casinojs

Module interfaces/pokerGame

Index

Interfaces

PokerGameConfig +interfaces/pokerGame | casinojs
diff --git a/docs/site/modules/interfaces_pokerPhase.html b/docs/modules/interfaces_pokerPhase.html similarity index 98% rename from docs/site/modules/interfaces_pokerPhase.html rename to docs/modules/interfaces_pokerPhase.html index db4df9f..f67d779 100644 --- a/docs/site/modules/interfaces_pokerPhase.html +++ b/docs/modules/interfaces_pokerPhase.html @@ -1,3 +1,3 @@ -interfaces/pokerPhase | casinojs

Module interfaces/pokerPhase

Index

Interfaces

PokerPhaseConfig +interfaces/pokerPhase | casinojs
diff --git a/docs/site/modules/interfaces_pokerPlayer.html b/docs/modules/interfaces_pokerPlayer.html similarity index 97% rename from docs/site/modules/interfaces_pokerPlayer.html rename to docs/modules/interfaces_pokerPlayer.html index 55d998f..b9cae33 100644 --- a/docs/site/modules/interfaces_pokerPlayer.html +++ b/docs/modules/interfaces_pokerPlayer.html @@ -1,3 +1,3 @@ -interfaces/pokerPlayer | casinojs

Module interfaces/pokerPlayer

Index

Interfaces

PokerPlayerConfig +interfaces/pokerPlayer | casinojs
diff --git a/docs/site/modules/interfaces_pokerRoom.html b/docs/modules/interfaces_pokerRoom.html similarity index 98% rename from docs/site/modules/interfaces_pokerRoom.html rename to docs/modules/interfaces_pokerRoom.html index 38772fb..6116f37 100644 --- a/docs/site/modules/interfaces_pokerRoom.html +++ b/docs/modules/interfaces_pokerRoom.html @@ -1,3 +1,3 @@ -interfaces/pokerRoom | casinojs

Module interfaces/pokerRoom

Index

Interfaces

PokerRoomConfig +interfaces/pokerRoom | casinojs
diff --git a/docs/site/modules/interfaces_pokerSeat.html b/docs/modules/interfaces_pokerSeat.html similarity index 98% rename from docs/site/modules/interfaces_pokerSeat.html rename to docs/modules/interfaces_pokerSeat.html index 461c5d7..21f9078 100644 --- a/docs/site/modules/interfaces_pokerSeat.html +++ b/docs/modules/interfaces_pokerSeat.html @@ -1,3 +1,3 @@ -interfaces/pokerSeat | casinojs

Module interfaces/pokerSeat

Index

Interfaces

PokerSeatConfig +interfaces/pokerSeat | casinojs
diff --git a/docs/site/modules/interfaces_pokerTable.html b/docs/modules/interfaces_pokerTable.html similarity index 98% rename from docs/site/modules/interfaces_pokerTable.html rename to docs/modules/interfaces_pokerTable.html index 8800a59..baaae89 100644 --- a/docs/site/modules/interfaces_pokerTable.html +++ b/docs/modules/interfaces_pokerTable.html @@ -1,3 +1,3 @@ -interfaces/pokerTable | casinojs

Module interfaces/pokerTable

Index

Interfaces

PokerTableConfig +interfaces/pokerTable | casinojs
diff --git a/docs/site/modules/models.html b/docs/modules/models.html similarity index 99% rename from docs/site/modules/models.html rename to docs/modules/models.html index 4a10f50..2ae794f 100644 --- a/docs/site/modules/models.html +++ b/docs/modules/models.html @@ -1,7 +1,7 @@ models | casinojs

Module models

// Import models from the centralized module
import { Card, Deck } from './models';
-

References

References

BaseEventEmitter BaseModel Card CardModel diff --git a/docs/site/modules/models__base.html b/docs/modules/models__base.html similarity index 97% rename from docs/site/modules/models__base.html rename to docs/modules/models__base.html index c5d0aaa..b6f5cbf 100644 --- a/docs/site/modules/models__base.html +++ b/docs/modules/models__base.html @@ -1,2 +1,2 @@ -models/_base | casinojs

Module models/_base

Index

Classes

BaseEventEmitter +models/_base | casinojs

Module models/_base

Index

Classes

diff --git a/docs/site/modules/models_card.html b/docs/modules/models_card.html similarity index 97% rename from docs/site/modules/models_card.html rename to docs/modules/models_card.html index 1c2a6f9..8b417a4 100644 --- a/docs/site/modules/models_card.html +++ b/docs/modules/models_card.html @@ -1,2 +1,2 @@ -models/card | casinojs

Module models/card

Index

Classes

Card +models/card | casinojs

Module models/card

Index

Classes

diff --git a/docs/site/modules/models_casino.html b/docs/modules/models_casino.html similarity index 97% rename from docs/site/modules/models_casino.html rename to docs/modules/models_casino.html index 0de8956..77ccff8 100644 --- a/docs/site/modules/models_casino.html +++ b/docs/modules/models_casino.html @@ -1,2 +1,2 @@ -models/casino | casinojs

Module models/casino

Index

Classes

Casino +models/casino | casinojs

Module models/casino

Index

Classes

diff --git a/docs/site/modules/models_deck.html b/docs/modules/models_deck.html similarity index 97% rename from docs/site/modules/models_deck.html rename to docs/modules/models_deck.html index ed6c508..0aefcc7 100644 --- a/docs/site/modules/models_deck.html +++ b/docs/modules/models_deck.html @@ -1,2 +1,2 @@ -models/deck | casinojs

Module models/deck

Index

Classes

Deck +models/deck | casinojs

Module models/deck

Index

Classes

diff --git a/docs/site/modules/models_logger.html b/docs/modules/models_logger.html similarity index 97% rename from docs/site/modules/models_logger.html rename to docs/modules/models_logger.html index bcf4a38..24b476e 100644 --- a/docs/site/modules/models_logger.html +++ b/docs/modules/models_logger.html @@ -1,2 +1,2 @@ -models/logger | casinojs

Module models/logger

Index

Classes

Logger +models/logger | casinojs

Module models/logger

Index

Classes

diff --git a/docs/site/modules/models_pokerGame.html b/docs/modules/models_pokerGame.html similarity index 98% rename from docs/site/modules/models_pokerGame.html rename to docs/modules/models_pokerGame.html index a14d54a..9fbf111 100644 --- a/docs/site/modules/models_pokerGame.html +++ b/docs/modules/models_pokerGame.html @@ -1,2 +1,2 @@ -models/pokerGame | casinojs

Module models/pokerGame

Index

Classes

PokerGame +models/pokerGame | casinojs

Module models/pokerGame

Index

Classes

diff --git a/docs/site/modules/models_pokerPhase.html b/docs/modules/models_pokerPhase.html similarity index 98% rename from docs/site/modules/models_pokerPhase.html rename to docs/modules/models_pokerPhase.html index 93a9a71..f829c0d 100644 --- a/docs/site/modules/models_pokerPhase.html +++ b/docs/modules/models_pokerPhase.html @@ -1,2 +1,2 @@ -models/pokerPhase | casinojs

Module models/pokerPhase

Index

Classes

PokerPhase +models/pokerPhase | casinojs

Module models/pokerPhase

Index

Classes

diff --git a/docs/site/modules/models_pokerPlayer.html b/docs/modules/models_pokerPlayer.html similarity index 98% rename from docs/site/modules/models_pokerPlayer.html rename to docs/modules/models_pokerPlayer.html index 670845f..e6b7be6 100644 --- a/docs/site/modules/models_pokerPlayer.html +++ b/docs/modules/models_pokerPlayer.html @@ -1,2 +1,2 @@ -models/pokerPlayer | casinojs

Module models/pokerPlayer

Index

Classes

PokerPlayer +models/pokerPlayer | casinojs

Module models/pokerPlayer

Index

Classes

diff --git a/docs/site/modules/models_pokerRoom.html b/docs/modules/models_pokerRoom.html similarity index 98% rename from docs/site/modules/models_pokerRoom.html rename to docs/modules/models_pokerRoom.html index c4fe3f9..9a45156 100644 --- a/docs/site/modules/models_pokerRoom.html +++ b/docs/modules/models_pokerRoom.html @@ -1,2 +1,2 @@ -models/pokerRoom | casinojs

Module models/pokerRoom

Index

Classes

PokerRoom +models/pokerRoom | casinojs

Module models/pokerRoom

Index

Classes

diff --git a/docs/site/modules/models_pokerSeat.html b/docs/modules/models_pokerSeat.html similarity index 98% rename from docs/site/modules/models_pokerSeat.html rename to docs/modules/models_pokerSeat.html index 2c1cb81..7083606 100644 --- a/docs/site/modules/models_pokerSeat.html +++ b/docs/modules/models_pokerSeat.html @@ -1,2 +1,2 @@ -models/pokerSeat | casinojs

Module models/pokerSeat

Index

Classes

PokerSeat +models/pokerSeat | casinojs

Module models/pokerSeat

Index

Classes

diff --git a/docs/site/modules/models_pokerTable.html b/docs/modules/models_pokerTable.html similarity index 98% rename from docs/site/modules/models_pokerTable.html rename to docs/modules/models_pokerTable.html index 2093bfc..38aa0d7 100644 --- a/docs/site/modules/models_pokerTable.html +++ b/docs/modules/models_pokerTable.html @@ -1,2 +1,2 @@ -models/pokerTable | casinojs

Module models/pokerTable

Index

Classes

PokerTable +models/pokerTable | casinojs

Module models/pokerTable

Index

Classes

diff --git a/docs/site/modules/utils.html b/docs/modules/utils.html similarity index 98% rename from docs/site/modules/utils.html rename to docs/modules/utils.html index 5100a40..7bd7e6c 100644 --- a/docs/site/modules/utils.html +++ b/docs/modules/utils.html @@ -1,6 +1,6 @@ utils | casinojs

Module utils

// Import models from the centralized module
import { Card, Deck } from './models';
-

References

References

Re-exports generateUniqueId
Re-exports logger
diff --git a/docs/site/modules/utils_generateUniqueId.html b/docs/modules/utils_generateUniqueId.html similarity index 97% rename from docs/site/modules/utils_generateUniqueId.html rename to docs/modules/utils_generateUniqueId.html index dcb8644..b9c9cae 100644 --- a/docs/site/modules/utils_generateUniqueId.html +++ b/docs/modules/utils_generateUniqueId.html @@ -1,2 +1,2 @@ -utils/generateUniqueId | casinojs

Module utils/generateUniqueId

Index

Functions

generateUniqueId +utils/generateUniqueId | casinojs
diff --git a/docs/site/modules/utils_logger.html b/docs/modules/utils_logger.html similarity index 97% rename from docs/site/modules/utils_logger.html rename to docs/modules/utils_logger.html index b7eac7b..df2816d 100644 --- a/docs/site/modules/utils_logger.html +++ b/docs/modules/utils_logger.html @@ -1,2 +1,2 @@ -utils/logger | casinojs

Module utils/logger

Index

Variables

logger +utils/logger | casinojs

Module utils/logger

Index

Variables

diff --git a/docs/site/variables/utils_logger.logger.html b/docs/variables/utils_logger.logger.html similarity index 98% rename from docs/site/variables/utils_logger.logger.html rename to docs/variables/utils_logger.logger.html index ffa8748..3e1e76d 100644 --- a/docs/site/variables/utils_logger.logger.html +++ b/docs/variables/utils_logger.logger.html @@ -7,4 +7,4 @@
import { logger } from "./path/to/utils/logger";

logger.log(LogLevel.INFO, "Application started");
-
+
diff --git a/docs/CHANGELOG.md b/manual/CHANGELOG.md similarity index 100% rename from docs/CHANGELOG.md rename to manual/CHANGELOG.md diff --git a/docs/site/media/CONTRIBUTING.md b/manual/CONTRIBUTING.md similarity index 100% rename from docs/site/media/CONTRIBUTING.md rename to manual/CONTRIBUTING.md diff --git a/docs/DEVELOPMENT_GUIDE.md b/manual/DEVELOPMENT_GUIDE.md similarity index 100% rename from docs/DEVELOPMENT_GUIDE.md rename to manual/DEVELOPMENT_GUIDE.md diff --git a/docs/DOCS.md b/manual/DOCS.md similarity index 100% rename from docs/DOCS.md rename to manual/DOCS.md diff --git a/docs/PROJECT_STRUCTURE.md b/manual/PROJECT_STRUCTURE.md similarity index 100% rename from docs/PROJECT_STRUCTURE.md rename to manual/PROJECT_STRUCTURE.md diff --git a/package.json b/package.json index ea063e9..1eb35f6 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "scripts": { "build": "tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json", "test": "jest --coverage", - "docify": "typedoc --entryPointStrategy expand src --out docs/site", + "docify": "typedoc --entryPointStrategy expand src --out docs", "prepublishOnly": "npm run build && npm run docify" }, "repository": {