Global

Members

(constant) GameTableProvider

Manages the game table state, including player data updates and table data. Provides functions to access game information and player data.
Source:

(constant) Middleware

Paramètres de session
Source:

REFRESH

_______________________________________ Actions to send informations to player _______________________________________
Source:

(constant) SET_SELECTED_ITEM

Defines action types for window-related actions.
Source:

(constant) SettingsProvider

SettingsProvider is a component that provides settings state and dispatcher methods to its child components via a React context.
Source:

(constant) WindowProvider

Manages window state and actions related to windows, such as opening, closing, and setting window types. Provides functions to interact with the window state and perform window-related actions.
Source:

(constant) activateBonus

Creates an action to activate a bonus.
Source:

(constant) bet

Creates an action to place a bet.
Source:

(constant) check

Creates an action to check.
Source:

(constant) comm

Fonction de test de communication entre le front et le back Le front envoie un Hello avec des données et le back le log Puis le back envoie des données et le front le log.
Source:

(constant) corsSettings

Paramètres cors du serveur. origin -> Fixer sur le front-end. Il n'y a que le serveur front end avec qui la communication est autoriser.
Source:

(constant) countByValue

Counts occurrences of each card value in a set of cards.
Source:

(constant) createGame

Creates an action to create a game. Includes possible arguments for game creation such as rules, game description, name, etc.
Source:

(constant) createGameV2

Creates an action to create a game with a specific room ID.
Source:

(constant) emptyPayload

Creates an action with an empty payload.
Source:

(constant) fold

Creates an action to fold.
Source:

(constant) gameLobby

Creates an action for the game lobby.
Source:

(constant) getPokerHand

Evaluates the highest poker hand possible from a set of cards.
Source:

(constant) hideCard

Creates an action to hide a card.
Source:

(constant) isFlush

Determines if a set of cards contains a flush.
Source:

(constant) isFourOfAKind

Determines if a set of cards contains four of a kind.
Source:

(constant) isFullHouse

Determines if a set of cards contains a full house.
Source:

(constant) isPair

Determines if a set of cards contains a pair.
Source:

(constant) isStraight

Determines if a set of cards contains a straight.
Source:

(constant) isStraightFlush

Determines if a set of cards contains a straight flush.
Source:

(constant) isThreeOfAKind

Determines if a set of cards contains three of a kind.
Source:

(constant) isTwoPairs

Determines if a set of cards contains two pairs.
Source:

(constant) joinRoom

Creates an action to join a room.
Source:

(constant) leaveRoom

Creates an action to leave the current room.
Source:

(constant) loggedIn

Creates an action indicating a user has logged in.
Source:

(constant) logsocket

Settings for output in the console.
Source:

(constant) showCard

Creates an action to show a card.
Source:

(constant) sitted

Creates an action indicating players are sitted at a table.
Source:

(constant) startGame

Creates an action to start the game.
Source:

(constant) useItems

useItems is a custom hook that fetches and organizes items into categories based on ownership. It structures items into 'owned' and 'unowned' for different item categories.
Source:

(constant) useUserData

Manages user data, including statistics and user-specific information. Provides functions to load and update user statistics.
Source:

(constant) validateCode

Validates a verification code.
Source:

(constant) validateEmail

Validates an email address.
Source:

(constant) validatePassword

Validates a password.
Source:

(constant) validatePasswordMatch

Validates if two passwords match.
Source:

(constant) validatePasswordOrNull

Validates a password or allows it to be null.
Source:

(constant) validateUsername

Validates a username.
Source:

Methods

AcceuilWindow()

AcceuilWindow component serves as the home screen for users to start or join games. It provides different functionalities based on the user's authentication status.
Source:

AlertWindow()

AlertWindow provides a modal window to handle user confirmations or cancellations. It uses alert parameters from the window context to display messages and execute actions.
Source:

AvatarDisplay()

AvatarDisplay is a component that displays the user's avatar based on the userId prop. It fetches avatar data either for the specified userId or the logged-in user, and displays elements like base avatar, sunglasses, and a background color. Props: - userId: String or Number representing the ID of the user whose avatar should be displayed.
Source:

BonusPanel()

BonusPanel displays a UI panel for activating game bonuses based on the number of various card symbols collected. Props: - nbHearts: Number of heart cards collected. - nbDiamonds: Number of diamond cards collected. - nbSpades: Number of spade cards collected. - nbClubs: Number of club cards collected.
Source:

BuyCoinsWindow()

BuyCoinsWindow provides a user interface for purchasing virtual coins. It displays various purchasing options and handles the purchase transactions.
Source:

Card()

Card displays a playing card that can be flipped between its front and back. It supports dynamic theming and card content based on provided props. Props: - card: Array representing the card data, with the first element as the number or face ('A', 'J', 'Q', 'K') and the second element as the suit ('H', 'D', 'C', 'S'). - styleClass: String representing the additional CSS class for styling the card container. - flippingCard: Boolean to control if the card should show the flip animation. - flippedStyle: String for additional CSS class when the card is flipped.
Source:

CardsPlacements()

CardsPlacements manages the display and animation of community cards and transition animations for player cards during a game.
Source:

CreateGameWindow()

Provides a UI for users to create a new game room or join an existing one, including server name input, optional password, and rank selection.
Source:

DynamicBar()

DynamicBar displays a dynamic UI based on the context of user interactions and game state. It features user coins, game controls, and server status based on various conditions from context providers.
Source:

ForgotPassword()

ForgotPassword provides a form for users to request a password reset link via email. It validates user input and displays appropriate feedback messages.
Source:

GameActionButtons()

GameActionButtons provides an interface for user actions in a game context, such as betting, raising, checking, calling, and folding.
Source:

GameTable()

Represents the main component for the game table. Manages the display of game elements and interactions with user settings and game state.
Source:

HandCards()

HandCards displays the player's hand in a poker game and allows the user to toggle visibility of each card. It also evaluates the current hand based on community cards and updates the hand guide accordingly. Props: - card1: Object representing the first card. - card2: Object representing the second card. - showHandCardProp: Boolean to control the card flipping animation.
Source:

ListTableItem(props)

ListTableItem component displays a single row in a list of game tables, providing options to join open or password-protected tables.
Parameters:
Name Type Description
props Object The component props.
Properties
Name Type Description
id string Unique ID of the table.
nom string Name of the table.
rang string Security level or rank of the table.
nombreDeJoueurs number Current number of players.
ouvert boolean Indicates if the table is open or password-protected.
onJoinClick function Function to execute when joining the table.
isJoining boolean Indicates if the join process is in progress.
Source:

LoadingWindow()

LoadingWindow component handles the loading state while a player is waiting to join a game. It listens for changes in the `playerSited` state from the Redux store to transition the UI.
Source:

LoginWindow()

LoginWindow provides a user interface for logging into the application. It handles user input for username and password, validates them, and processes the login.
Source:

LogoComponent()

LogoComponent displays a logo, optionally with a label and animation. It supports interactive behavior with an onClick handler. Props: - styleClass: String specifying additional CSS classes for the logo container. - onClick: Function to handle click events on the logo. - label: String (optional) to display a label next to the logo. - loading: Boolean indicating if a loading animation should be shown.
Source:
Navbar provides a dynamic navigation bar based on game and user session state. It handles actions like logging out, leaving rooms, opening various windows, etc.
Source:

PlayersPlacements()

PlayersPlacements manages the display of player profiles and pots on the game table. It listens for updates to the players in the game and renders each player's profile. Props: - showMiddle: Boolean to control the visibility of the middle section (usually pots in the game).
Source:

PlayersPots()

PlayersPots displays the current betting amount (pot) for each player in a game. It conditionally renders these amounts based on the visibility prop. Props: - players: Array of player objects, each containing betting information. - isVisible: Boolean that controls the visibility of the component.
Source:

PlayersProfile()

PlayersProfile displays individual player information including status, chips count, name, cards, and also a progress bar when it's the player's turn to act. Props: - status: String indicating the player's game status (e.g., 'active', 'folded'). - chips: Number indicating the amount of chips the player has. - name: String representing the player's name. - cards: Array of card objects the player holds. - flippingPlayerCards: Boolean to control card flip animations. - gotCards: Boolean indicating if the player has cards. - playerId: Unique identifier for the player. - cardsVisible: Array of booleans indicating visibility of each card. - isFocus: Boolean indicating if it is the player's turn. - isYou: Boolean to specify if the profile is of the user themselves. - timer: Number representing the countdown time for player's action.
Source:

ProfileWindow()

ProfileWindow component displays the user's profile information, including their avatar, name, email, coin balance, and account creation date.
Source:

RankingWindow()

RankingWindow component fetches and displays a paginated list of user rankings, including their rank, username (pseudo), and coin balance (SC).
Source:

ResetPasswordWindow()

ResetPasswordWindow provides a form for users to reset their password. It includes validation for code, new password, and password confirmation.
Source:

ServerPanelWindow()

ServerPanelWindow component manages the display of available game rooms, including pagination, search functionality, and the ability to join rooms.
Source:

SettingsWindow()

SettingsWindow component provides a UI for the user to manage their settings including theme, sound, animations, and language preferences.
Source:

ShopItem(item, onClickItem, isOwned, isActive, styleClass)

ShopItem displays a single item in the shop, handling different item types and states.
Parameters:
Name Type Description
item Object The item data.
onClickItem function Handler for when the item is clicked.
isOwned boolean Indicates if the item is already owned by the user.
isActive boolean Indicates if the item is currently active.
styleClass string Additional CSS class for styling.
Source:

ShopWindow()

ShopWindow component provides a user interface for browsing and activating various avatars and accessories.
Source:

SignUpWindow()

SignUpWindow provides a user interface for registering a new account. It includes form fields for user information and performs client-side validation.
Source:

SuccessWindow()

SuccessWindow component displays a success message to the user. The message is translated based on the current language settings.
Source:

Table()

The Table component serves as the primary UI container for the game, including players' placements, cards, and other game-related information based on the visibility state controlled through window context.
Source:

TextGlitch()

TextGlitch applies a glitch effect to text based on the animation settings. It allows the text content and glitch styling to be dynamically adjusted via props. Props: - children: The text content to apply the glitch effect to. - styleClass: Additional CSS class for custom styling. - glitchStyle: Specific glitch effect style class to apply when animations are enabled.
Source:

TextInputComponent()

TextInputComponent creates a styled input field with optional error handling. It uses a translation hook for localized placeholders and error messages. Props: - name: String representing the input's name attribute. - placeholder: String identifier for translation of the input's placeholder text. - type: String specifying the HTML input type, defaulting to "text". - value: Controlled value of the input. - onChange: Function to handle changes in the input. - errorMessage: String identifier for the error message translation. - styleClass: CSS class for styling the input element. - styleClass2: Additional CSS class for the outer container. - onKeyDown: Function to handle the 'onKeyDown' event.
Source:

TotalPot()

TotalPot displays the total amount of chips currently in the game's pot. It fetches the total pot value from the game context and displays it in a formatted manner.
Source:

ValidationWindow()

ValidationWindow provides a UI for confirming item purchases. It displays the item to be purchased and handles the confirmation process.
Source:

WaitingWindow()

WaitingWindow component displays a waiting screen for players before the game starts. If the user is the master, they have the option to start the game. The component also displays a message when it is the player's turn to act.
Source:

Window()

The Window component acts as a container for various modal windows in the application. It renders different content based on the current window type from the context.
Source:

delayedExecution(fn, delay) → {function}

Creates a delayed version of the given function that will only execute after the specified delay in milliseconds.
Parameters:
Name Type Description
fn function The function to delay.
delay number The time to delay in milliseconds.
Source:
Returns:
A new function that delays the execution of `fn`.
Type
function

delayedExecutionWithCancel(fn, delay) → {Object}

Creates a delayed version of the given function with cancellation capability.
Parameters:
Name Type Description
fn function The function to delay.
delay number The time to delay in milliseconds.
Source:
Returns:
An object containing the delayed function and a cancel method.
Type
Object

(async) emptyGameDesc()

Remove all the gameDescription from the database.
Source:

formatNumber(value) → {string|number}

Formats a numeric value as a localized string. This function attempts to format a number using the `toLocaleString` method, which converts the number to a more readable format according to the local convention.
Parameters:
Name Type Description
value number The number to be formatted.
Source:
Returns:
A localized string representation of the number or 0 in case of an error.
Type
string | number

getStyles(windowType, isLogged, isGameTableVisible, isWindowOpen, showWaitingMessage, isSpectator) → {object}

Generates styles based on window state and other parameters.
Parameters:
Name Type Description
windowType string The type of window.
isLogged boolean Indicates whether the user is logged in.
isGameTableVisible boolean Indicates whether the game table is visible.
isWindowOpen boolean Indicates whether any window is open.
showWaitingMessage boolean Indicates whether a waiting message should be shown.
isSpectator boolean Indicates whether the user is a spectator.
Source:
Returns:
An object containing CSS classes for different components based on the provided parameters.
Type
object

(async) resetPlayerInGame()

Reset the status inGame of all the players.
Source:

(async) sendVerificationEmail(email, code)

Sends a verification email to the specified email address with the provided verification code.
Parameters:
Name Type Description
email string The recipient's email address
code string The verification code to be sent
Source:

useAudio(urlLight, urlDark, theme, play, volume, loop)

Custom hook to manage audio playback based on the theme and sound settings.
Parameters:
Name Type Default Description
urlLight string The URL of the audio file for the light theme.
urlDark string The URL of the audio file for the dark theme.
theme string Current theme setting ('light' or 'dark').
play boolean Whether the audio should be played or paused.
volume number Volume level (0.0 to 1.0).
loop boolean true Whether the audio should loop.
Source:

useOnClickOutside(ref, handler)

Custom hook that triggers a handler when a click occurs outside the specified element.
Parameters:
Name Type Description
ref Object The ref of the element to detect outside clicks for.
handler function The function to call when an outside click is detected.
Source:

useTranslation() → {Object}

Custom hook to provide translated strings based on the current application language. Falls back to English if the translation in the selected language is not available.
Source:
Returns:
Object containing a single function `getTranslatedWord` to fetch a translated string.
Type
Object