From b421544d3bec5b7b74de03ca1aec72e3c26588df Mon Sep 17 00:00:00 2001 From: "Bekk I.V." <888_1@mail.ru> Date: Sun, 25 Jan 2026 21:41:20 +0500 Subject: [PATCH 01/10] Make paragraph 7. --- .idea/.gitignore | 8 ++++++++ .idea/encodings.xml | 7 +++++++ .idea/misc.xml | 12 ++++++++++++ .idea/vcs.xml | 6 ++++++ src/main/webapp/index.jsp | 6 +++++- 5 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/encodings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..13566b81 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 00000000..aa00ffab --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..f24c79d1 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 964cc071..718c21f1 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -7,7 +7,11 @@

Tic-Tac-Toe

- + + 0 + 1 + 2 +

Tic-Tac-Toe

@@ -28,19 +30,32 @@
- - + +

CROSSES WIN!

+
+

NOUGHTS WIN!

+
From 16376d2dc09ac6223e24625f44fbba7d9eea44eb Mon Sep 17 00:00:00 2001 From: "Bekk I.V." <888_1@mail.ru> Date: Mon, 26 Jan 2026 13:18:47 +0500 Subject: [PATCH 10/10] All Make. --- src/main/java/com/tictactoe/LogicServlet.java | 6 ++++++ src/main/webapp/index.jsp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/main/java/com/tictactoe/LogicServlet.java b/src/main/java/com/tictactoe/LogicServlet.java index c78d6171..63b81cd2 100644 --- a/src/main/java/com/tictactoe/LogicServlet.java +++ b/src/main/java/com/tictactoe/LogicServlet.java @@ -39,6 +39,12 @@ protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws Se if (checkWin(resp, currentSession, field)) { return; } + } else { + currentSession.setAttribute("draw", true); + List data = field.getFieldData(); + currentSession.setAttribute("data", data); + resp.sendRedirect("/index.jsp"); + return; } diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index c91b3ec3..801306a2 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -44,6 +44,12 @@ + +

IT'S A DRAW

+
+ +
+