+
🔮 Ласкаво просимо до квесту! 🔮
+
Відчуй себе справжнім шукачем пригод! Введи своє ім’я та вирушай у подорож повну таємниць і небезпек.
+
+
+
+
diff --git a/Bevzyuk/src/main/webapp/style.css b/Bevzyuk/src/main/webapp/style.css
new file mode 100644
index 0000000..216163f
--- /dev/null
+++ b/Bevzyuk/src/main/webapp/style.css
@@ -0,0 +1,134 @@
+/* Загальні стилі сторінки */
+body {
+ font-family: 'Arial', sans-serif;
+ background: linear-gradient(135deg, #1b2838, #3b5363);
+ color: #ecf0f1;
+ padding: 20px;
+ text-align: center;
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start;
+ align-items: center;
+ min-height: 100vh;
+}
+
+/* Контейнер для квестових питань */
+.quest-container {
+ margin-top: 10vh;
+ max-width: 800px;
+ background: rgba(27, 40, 56, 0.9);
+ padding: 30px;
+ border-radius: 10px;
+ box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
+}
+
+/* Заголовок */
+h2 {
+ font-size: 28px;
+ margin-bottom: 20px;
+ text-transform: uppercase;
+ letter-spacing: 1.5px;
+ color: #dcdde1;
+}
+
+/* Стилі для кнопок */
+form button {
+ background: linear-gradient(135deg, #6a11cb, #2575fc);
+ color: #fff;
+ padding: 12px 24px;
+ margin: 10px;
+ border: none;
+ border-radius: 5px;
+ cursor: pointer;
+ font-size: 18px;
+ font-weight: bold;
+ transition: background 0.3s, transform 0.2s;
+ box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
+}
+
+form button:hover {
+ background: linear-gradient(135deg, #2575fc, #6a11cb);
+ transform: scale(1.05);
+}
+
+/* Стилі для повідомлень */
+p {
+ font-size: 20px;
+ margin: 20px 0;
+ color: #b2bec3;
+}
+
+/* Лінки */
+a {
+ color: #f39c12;
+ text-decoration: none;
+ font-weight: bold;
+ transition: color 0.3s;
+}
+
+a:hover {
+ color: #e74c3c;
+}
+
+/* Фон для стартової сторінки */
+body.start-page {
+ background: url('https://www.kapitoliy.net.ua/wp-content/uploads/2018/11/istoriya-pro-pryvyda-pidgoretskogo-zamku.jpg') no-repeat center center fixed;
+ background-size: cover;
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ height: 100vh;
+ padding-top: 10vh;
+ margin: 0;
+ color: #ecf0f1;
+}
+
+/* Контейнер для контенту */
+.container {
+ background: rgba(27, 40, 56, 0.9);
+ padding: 30px;
+ border-radius: 10px;
+ box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
+ text-align: center;
+ max-width: 600px;
+ width: 90%;
+}
+
+/* Заголовок */
+h1 {
+ font-size: 32px;
+ margin-bottom: 20px;
+ text-transform: uppercase;
+ letter-spacing: 2px;
+ color: #f1c40f;
+}
+
+/* Поле введення */
+input[type="text"] {
+ padding: 10px;
+ border: 2px solid #3498db;
+ border-radius: 5px;
+ font-size: 16px;
+ width: calc(100% - 22px);
+ margin-bottom: 20px;
+ background: #1b2838;
+ color: #ecf0f1;
+}
+
+/* Кнопка старту */
+button {
+ background: #e74c3c;
+ color: #fff;
+ padding: 12px 24px;
+ border: none;
+ border-radius: 5px;
+ font-size: 18px;
+ cursor: pointer;
+ transition: background 0.3s, transform 0.2s;
+ box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
+}
+
+button:hover {
+ background: #c0392b;
+ transform: scale(1.05);
+}
diff --git a/Bevzyuk/src/test/java/com/quest/GameServletTest.java b/Bevzyuk/src/test/java/com/quest/GameServletTest.java
new file mode 100644
index 0000000..b39c300
--- /dev/null
+++ b/Bevzyuk/src/test/java/com/quest/GameServletTest.java
@@ -0,0 +1,80 @@
+package com.quest;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import java.io.IOException;
+import java.util.Map;
+
+import static org.junit.jupiter.api.Assertions.*;
+import static org.mockito.Mockito.*;
+
+class GameServletTest {
+
+ @InjectMocks
+ private GameServlet servlet;
+
+ @Mock
+ private HttpServletRequest request;
+
+ @Mock
+ private HttpServletResponse response;
+
+ @Mock
+ private HttpSession session;
+
+ @Mock
+ private RequestDispatcher dispatcher;
+
+ @BeforeEach
+ void setUp() {
+ MockitoAnnotations.initMocks(this);
+ servlet.init();
+
+ when(request.getSession()).thenReturn(session);
+ when(request.getRequestDispatcher("game.jsp")).thenReturn(dispatcher);
+ }
+
+ @Test
+ void testInitQuestions() {
+ assertNotNull(servlet.questions, "questions не має бути null");
+ assertEquals("Ти стоїш перед дверима. Що робити?", servlet.questions.get(1).getText());
+ }
+
+ @Test
+ void testDoGet_SetsSessionAttributesAndForwards() throws ServletException, IOException {
+ when(request.getParameter("playerName")).thenReturn("Тарас");
+
+ servlet.doGet(request, response);
+
+ verify(session).setAttribute("questions", servlet.questions);
+ verify(session).setAttribute("playerName", "Тарас");
+ verify(session).setAttribute("step", 1);
+ verify(dispatcher).forward(request, response);
+ }
+
+ @Test
+ void testDoPost_UpdatesStepAndRedirects() throws IOException {
+ when(session.getAttribute("step")).thenReturn(1);
+ when(request.getParameter("choice")).thenReturn("Відкрити двері");
+
+ Map