project-ee10cffd

byДанилко Курілкін

> Create a fully standalone HTML game "Tower Checkers (Bashni, Column Checkers)" for two players. Everything should work in one HTML file (HTML + CSS + JavaScript), without third-party libraries and the Internet. Basic requirements 8×8 field. 12 white and 12 black checkers. Play only on dark squares. White moves first. Highlight possible moves. Highlight all possible captures. Forbid any illegal moves. Fully support multiple captures in one move. Show the winner after the game is over. "New game" button. Undo last move button. Rules Use Russian checkers rules, but with the mechanics of column checkers (Bashni): 1. A regular checker moves forward diagonally one square. 2. The queen moves any distance diagonally. 3. Capture is mandatory. 4. If there are several capture options, the player can choose any. 5. The checker captures forward and backward. 6. The queen captures at any distance. 7. After capturing, if the next capture is possible with the same rook, the move continues. 8. If during the capture series a checker reaches the last row, it immediately becomes a queen and continues to capture as a queen. Rules of towers This is the most important part. The captured checker is NOT removed from the board. It is placed UNDER the checker that captured it. Thus, a tower (column) is formed. The tower moves as one piece. The type of tower is determined by the TOP checker. If there is a simple checker on top, the rook moves as a simple checker. If there is a queen on top, the rook moves as a queen. If the rook is captured, ONLY the top checker is removed. The rest of the rook remains in place. If after removing the top checker, a checker of a different color appears on top, the rook passes under the control of another player. If there was a queen inside the rook, after opening it has the status of a queen again. Internal structure Each cell should store an array: [ {color:"white", king:false}, {color:"black", king:true}, ... ] The top element of the array is the top of the rook. All algorithms should work with this structure. Interface A beautiful chessboard. Rooks are displayed as stacks of checkers. Show its height next to the rook. The queen should have a crown. Select the selected tower. Animation of movement. Animation of capture. Display of the turn order. Algorithms Implement: search for all possible moves; search for all possible series of captures; check for legality of the move; automatic completion of the series of captures; determination of the end of the game; check for blocking of the opponent. The code should be well structured: Board class; Game class; Renderer class; separate functions: getLegalMoves() getCaptures() makeMove() undoMove() promoteIfNeeded() checkGameOver() It is forbidden to duplicate the code. Finally, before generation, check the logic of the Bashni rules yourself again, especially: transfer of towers; capture of only the top checker; transformation into a queen during a series of captures; multiple captures; proper tower control switching. Undo function. The result should be a ready-to-run HTML file without errors. @Consider

GameTower Checkers Game
Game

Comments (0)

No comments yet. Be the first!

System Requirements

System Requirement Document
Page 1 of 5

System Requirements Document for project-ee10cffd

Introduction

This document outlines the system requirements for the project-ee10cffd, which involves creating a fully standalone HTML game called "Tower Checkers (Bashni, Column Checkers)" for two players. The game must function entirely within a single HTML file, incorporating HTML, CSS, and JavaScript, without relying on third-party libraries or the Internet.

System Overview

The project-ee10cffd aims to deliver a digital version of the traditional game "Tower Checkers," adhering to specific rules and mechanics. The game will be played on an 8x8 board with 12 white and 12 black checkers, following the rules of Russian checkers with additional tower mechanics.

Page 2 of 5

Functional Requirements as Story Points

  • As a Player, I want to play on an 8x8 field with 12 white and 12 black checkers.
  • As a Player, I want to move only on dark squares, with white moving first.
  • As a Player, I want to see possible moves highlighted.
  • As a Player, I want to see all possible captures highlighted.
  • As a Player, I want to be prevented from making illegal moves.
  • As a Player, I want to fully support multiple captures in one move.
  • As a Player, I want to see the winner displayed after the game is over.
  • As a Player, I want a "New game" button to start a new game.
  • As a Player, I want an "Undo last move" button to revert the last move.
  • As a Player, I want to play using Russian checkers rules with column checkers mechanics.
  • As a Player, I want captured checkers to form a tower under the capturing checker.
  • As a Player, I want the tower to move as one piece, determined by the top checker.
  • As a Player, I want the top checker to be removed when a tower is captured.
  • As a Player, I want the rook to switch control if a different color appears on top after capture.
  • As a Player, I want a queen inside a rook to regain its status after being revealed.
  • As a Player, I want the game to automatically complete a series of captures.
  • As a Player, I want the game to determine the end of the game and check for opponent blocking.

User Personas

  • Player: A user who plays the game, making strategic moves and captures to win.
Page 3 of 5

Core User Flows

  1. Start a New Game: Player clicks "New game" -> Board is reset -> Player begins play.
  2. Make a Move: Player selects a checker -> Possible moves are highlighted -> Player moves checker.
  3. Capture Sequence: Player selects a checker -> Possible captures are highlighted -> Player captures -> If further captures are possible, they continue -> Capture sequence completes.
  4. Undo Move: Player clicks "Undo last move" -> Last move is reverted.
  5. Game End: Player completes a move -> Game checks for winner or stalemate -> Winner is displayed.

Visuals Colors and Theme

  • primary: #2E4053 (dark slate)
  • primary_light: #5D6D7E (light slate)
  • secondary: #F39C12 (amber)
  • accent: #E74C3C (vibrant red)
  • highlight: #F1C40F (gold)
  • bg: #FDFEFE (white)
  • surface: rgba(46, 64, 83, 0.8)
  • text: #17202A (dark charcoal)
  • text_muted: #7B7D7D (grey)
  • border: rgba(46, 64, 83, 0.2)
Page 4 of 5

Signature Design Concept

The homepage will feature an interactive chessboard that dynamically highlights possible moves and captures as the player hovers over checkers. The board will animate the movement of checkers and the formation of towers, providing a visually engaging experience. The checkers will stack visibly when forming towers, with a crown icon appearing on queens. The interface will include smooth animations for moves and captures, enhancing the game's strategic depth.

Landing Hero Motion Brief

The landing page will feature a continuous loop animation of a checker moving across the board, capturing another checker, and forming a tower. This animation will illustrate the core mechanics of the game, showing the transformation of a checker into a tower and the strategic possibilities of multiple captures. The animation will be created using CSS and JavaScript, ensuring smooth transitions and interactions.

Interaction Model & Motion Direction

The intended interaction model for the landing page is "animated," with moderate scroll-triggered reveals and hover transitions. The game interface will feature spring physics on interactive elements, providing a polished and engaging user experience.

Page 5 of 5

Non-Functional Requirements

  • The game must be fully functional in a single HTML file.
  • The game must not use any third-party libraries or require an internet connection.
  • The game must be compatible with modern web browsers.

Tech Stack

  • Frontend: HTML, CSS, JavaScript (no libraries)

Assumptions and Constraints

  • The game will be played on desktop browsers.
  • The game will not support multiplayer over the internet.
  • The game will not include AI opponents.

Glossary

  • Checker: A game piece used in checkers.
  • Queen: A checker that has reached the opponent's back row and gained additional movement capabilities.
  • Tower: A stack of checkers formed during the game.
  • Rook: Another term for a tower in this context.
Game: View Board
Game: Start New Game
Game: Select Checker
Game: View Highlighted Moves
Game: Move Checker
Game: View Highlighted Captures
Game: Capture Checker
Game: Continue Capture Sequence
Game: Form Tower
Game: Promote to Queen
Game: Undo Last Move
Game: Check Game Over
Game: View Winner
Game: View Board
Game: Start New Game
Game: Select Checker
Game: View Highlighted Moves
Game: Move Checker
Game: View Highlighted Captures
Game: Capture Checker
Game: Continue Capture Sequence
Game: Form Tower
Game: Promote to Queen
Game: Undo Last Move
Game: Check Game Over
Game: View Winner