# How to play

### Connect to a wallet

Firstly, you have to connect to an existing wallet. The most common wallet is the MetaMask. If you have not installed it, please install the MetaMask web browser plugin.

After the game has been connected to the wallet, you will find that the UI has some little changes:

<figure><img src="/files/m1nhZ4ZhZPwpSz6goAaP" alt=""><figcaption></figcaption></figure>

### Play the Card Game Demo

Click the "play" button of the first game card,&#x20;

<figure><img src="/files/rf7Ob96VaUVQDMvv8MkM" alt=""><figcaption></figcaption></figure>

You will look at a new page:

<figure><img src="/files/msiwi6He5WT5EaXzdrNo" alt=""><figcaption></figcaption></figure>

Click the "Start Play" button to continue further.

After a signature request to the wallet, you will see the demonstrated game UI:&#x20;

<figure><img src="/files/XjaJ33L0z06PDf5hj6aC" alt=""><figcaption></figcaption></figure>

It has the simplest card battle form: you (the user) are the doge on the left, and every round you have 3 times of attack abilities, you can choose to strike on the first round and choose to defend on the next round,  and so on and on. At every turn change, the enemy (the doge on the right) will attack you. If your HP <= 0, you lose; if the enemy's HP <=0, you will go ahead and face a new doge enemy.

The game mechanism is very simple, you can dig it by yourself. Good luck.


---

# 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://docs.bladedao.games/zkunity-game-engine/zkunity-guide/demo-a-roguelike-card-game/how-to-play.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.
