Add difficulty levels to "Against AI" game mode
Multiple difficulty levels have been implemented for the "Against AI" mode. This involved changes in the user interface to allow players to select the difficulty and corresponding adjustments in the game logic. Also, Artificial Intelligence behavior has been adapted according to these difficulty levels.
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" asp-controller="Pve" asp-action="New" id="against-ai-link">
|
||||
<a class="nav-link" data-toggle="modal" data-target="#pve-modal">
|
||||
<i class="fa-solid fa-chalkboard-user"></i>
|
||||
Against AI
|
||||
</a>
|
||||
@@ -69,6 +69,38 @@
|
||||
|
||||
@RenderBody()
|
||||
|
||||
<div class="modal fade" id="pve-modal" tabindex="-1" role="dialog" aria-labelledby="pveModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Against AI</h5>
|
||||
<button class="close" type="button" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@* // 1: Chimpanzee *@
|
||||
@* // 2: Easy *@
|
||||
@* // 3: Intermediate *@
|
||||
@* // 4: Hard *@
|
||||
@* // 5: Brutal *@
|
||||
@* // 6: Grandmaster *@
|
||||
@* // 7: Unbeatable *@
|
||||
<a class="btn btn-secondary btn-block btn-difficulty" asp-controller="Pve" asp-action="New" asp-route-difficulty="1">Chimpanzee</a>
|
||||
<a class="btn btn-secondary btn-block btn-difficulty" asp-controller="Pve" asp-action="New" asp-route-difficulty="2">Easy</a>
|
||||
<a class="btn btn-secondary btn-block btn-difficulty" asp-controller="Pve" asp-action="New" asp-route-difficulty="3">Intermediate</a>
|
||||
<a class="btn btn-secondary btn-block btn-difficulty" asp-controller="Pve" asp-action="New" asp-route-difficulty="4">Hard</a>
|
||||
<a class="btn btn-secondary btn-block btn-difficulty" asp-controller="Pve" asp-action="New" asp-route-difficulty="5">Brutal</a>
|
||||
<a class="btn btn-secondary btn-block btn-difficulty" asp-controller="Pve" asp-action="New" asp-route-difficulty="6">Grandmaster</a>
|
||||
<a class="btn btn-secondary btn-block btn-difficulty" asp-controller="Pve" asp-action="New" asp-route-difficulty="7">Unbeatable</a>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-secondary" type="button" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="footer mt-auto py-3">
|
||||
<div class="container">
|
||||
© @DateTime.UtcNow.Year - Aiursoft.ChessServer -
|
||||
|
||||
Reference in New Issue
Block a user