diff --git a/src/backend/main/index.tsx b/src/backend/main/index.tsx index bc7bd3f..d759946 100644 --- a/src/backend/main/index.tsx +++ b/src/backend/main/index.tsx @@ -4,15 +4,15 @@ import { handleBoardgame } from "./boardgame-handler.ts"; import { getCounterHtml } from "../components/counter.tsx"; export const mainPageHandler: RequestHandler = (req, res) => { - const board1 = handleBoardgame(req, res, "tictactoe1", "tictactoe"); - if (!board1) { + const boardThree = handleBoardgame(req, res, "tictactoe-three-1", "tictactoe-three"); + if (!boardThree) { // No return value from handleBoardgame means that it redirected user to another URL, // and we no longer need to render anything. return; } - const board2 = handleBoardgame(req, res, "tictactoe2", "tictactoe"); - if (!board2) { + const boardAll = handleBoardgame(req, res, "tictactoe-all-2", "tictactoe-all"); + if (!boardAll) { return; } @@ -42,8 +42,20 @@ export const mainPageHandler: RequestHandler = (req, res) => {
+ "Three in a row" generalized variant of tictactoe (it is enough to get three adjacent cells on the same row, + on the same column, or on the same 45°/135° line) +
+ {boardThree} ++ "All in a row" generalized variant of tictactoe (you need to get complete row, complete column, or, on + square boards, complete diagonal) +
+ {boardAll} +