# List of functions

### updatePointsPlayer\_UI()

Has two arguments:

* points, to specify the new points value for X player
* player, to specify which player must receive the point update

Called every time the AC updates the points when cards are evaluated so that the information is displayed.

This function calls the W\_dealerData or the W\_youData, depending on the player input, to update the proper side of the UI.

### updateMoneyPlayer\_UI()

Has one argument:

* money

Basically the same as the function above, except it's for money, and only for the player (You), not the dealer.

### updateCurrentBet\_UI()

Has one argument:

* bet

Same as above, but for bet.

### changeSwitcherIndex\_UI

Change the index of the Widget Switcher, which can show the panel to increase/reset/confirm the bet (phase 3), or the panel to draw a new card / stand.

Changing the index of the Switcher means going up to a new phase.&#x20;

### createPopup\_UI()

Create the popup that fill the screen at the end of a round / game, telling if the player (You) has won, lost, or if there was a push.&#x20;

If the player (You) has money = 0, then the bool resetGame is set to true, and clicking on the button of the popup will start a game, going back to the very first phase of the AC.

Otherwise, bool is set to false, and clicking on the button of the popup will go back to the phase 2 of the AC.

### removePopup()

Remove the popup from the parent (the whole screen), deleting it. Called right after the player has clicked on the popup button; a new game / round has started.&#x20;

### populateCards\_UI()

Has two arguments:

* player
* cards

Called every time a player (Dealer or You) has drawn or revealed cards.&#x20;

Depending on the player input, will take the cards and show them in W\_youDrawnCard (bottom of the screen) or W\_dealerDrawnCard (top of the screen)

### clearDrawnCards\_UI()

Called at the start of game / round. Clear both W\_youDrawnCard and W\_dealerDrawnCard widgets to remove all cards from the UI.

### disableConfirmButton\_UI()

Has two arguments:

* disable

Called at the start of a game / round (disable = true), anytime the player (You) click on the "reset" button (disable = true), or anytime the player click on a $ button to bet (disable = false).

If disable is set to true, then the "confirm" button during the 3 -  betting phase cannot be clicked. Prevent the player (You) from running the game without placing a bet.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://easy-blackjack.gitbook.io/easy_blackjack-docs/w_main/list-of-functions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
