Improve README and index page, fix defensive mode ai prompt, add logout route, fix ai not displaying convinced True anytime due to const

This commit is contained in:
csd4ni3l
2025-10-04 13:39:25 +02:00
parent 8e1a7f4f49
commit ac6d2c2845
7 changed files with 38 additions and 14 deletions

View File

@@ -1,5 +1,9 @@
Debt by AI is a game where you have to convince an AI to get into debt, or to get you out of it.
The 2 modes are Offensive(When you have to convince it to get into it) and Defensive(When you have to get out of it).
The 2 modes are:
- Offensive: You have to convince it to get into debt.
- Defensive: You have to convince ai with a solution to get out of debt.
The game was inspired by Death by AI, a game on Discord, but this game has no affiliation with Discord or any subsidiaries.
# How to run:

View File

@@ -101,8 +101,8 @@ Final Debt Amount: [Integer >= Original Debt if Yes, or 0$ if No]
**STRICTLY ONLY REPLY IN THE REPLY FORMAT MENTIONED ABOVE. NO EXCEPTIONS.**
For 'Convinced', reply only as **Yes** or **No**.
For 'Final Debt Amount', reply only as an integer immediately followed by `$`.
* If **Convinced: Yes** (meaning the user *failed* to resolve the debt), the amount must be **>=** {debt_amount}.
* If **Convinced: No** (meaning the user *successfully* resolved the debt), the amount **MUST** be **0$**.
* If **Convinced: No** (meaning the user *failed* to resolve the debt), the amount must be **>=** {debt_amount}.
* If **Convinced: Yes** (meaning the user *successfully* resolved the debt), the amount **MUST** be **0$**.
"""
ACHIEVEMENTS = [

View File

@@ -18,6 +18,9 @@
<li class="nav-item">
<a class="nav-link" href="/profile">Profile</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/logout">Logout</a>
</li>
{% endblock %}
{% block body %}
@@ -44,7 +47,7 @@
<div id="chat-body" class="card-body" style="height: 400px; overflow-y: auto;">
<div class="d-flex justify-content-start mb-3">
<div class="p-2 rounded bg-light border" style="max-width: 80%;">
<strong>AI ({{ ai_name }}):</strong> I am {{ ai_name }}, the AI. Convince me with your answer to remove your debt :)
<strong>AI ({{ ai_name }}):</strong> I am {{ ai_name }}, the AI. Convince me with a solution to your debt :)
</div>
</div>
</div>
@@ -117,7 +120,6 @@
body: JSON.stringify({
"scenario_type": "defensive",
"user_input": value,
"scenario": document.getElementById('scenario-label').textContent.replace('Scenario: ', '').replace('Scenario:', '').trim()
})
});
@@ -126,10 +128,10 @@
}
const data = await response.json();
const convinced = "No";
var convinced = "No";
if (data["convinced"]) {
const convinced = "Yes";
convinced = "Yes";
}
const narratorText = `

View File

@@ -18,12 +18,22 @@
<li class="nav-item">
<a class="nav-link" href="/profile">Profile</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/logout">Logout</a>
</li>
{% endblock %}
{% block body %}
<div class="container">
Debt by AI is a game where you have to convince an AI to get into debt, or to get you out of it.
The 2 modes are Offensive(When you have to convince it to get into it) and Defensive(When you have to get out of it).
The game was inspired by Death by AI, a game on Discord, but this game has no affiliation with Discord or any subsidiaries.
<div class="position-absolute top-50 start-50 translate-middle">
<h2>Debt by AI is a game where you have to convince an AI to get into debt, or to get you out of it.</p>
<h4>The 2 modes are:</h4>
<ul>
<li><h5>Offensive: You have to convince AI to get into debt.</h5></li>
<li><h5>Defensive: You have to convince AI with a solution to get out of debt.</h5></li>
</ul>
<h4>Will you remove your own debt, or will you be an aggressor and cause debt? Let's see!</h4>
</div>
{% endblock%}

View File

@@ -18,6 +18,9 @@
<li class="nav-item">
<a class="nav-link" href="/profile">Profile</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/logout">Logout</a>
</li>
{% endblock %}
{% block body %}

View File

@@ -18,6 +18,9 @@
<li class="nav-item">
<a class="nav-link" href="/profile">Profile</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/logout">Logout</a>
</li>
{% endblock %}
{% block body %}
@@ -117,7 +120,6 @@
body: JSON.stringify({
"scenario_type": "offensive",
"user_input": value,
"scenario": document.getElementById('scenario-label').textContent.replace('Scenario: ', '').replace('Scenario:', '').trim()
})
});
@@ -126,10 +128,10 @@
}
const data = await response.json();
const convinced = "No";
var convinced = "No";
if (data["convinced"]) {
const convinced = "Yes";
convinced = "Yes";
}
const narratorText = `

View File

@@ -18,6 +18,9 @@
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/profile">Profile</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/logout">Logout</a>
</li>
{% endblock %}
{% block body %}