Skip to content

naveenalla3000/devsecops-demo

 
 

Repository files navigation

DevSecOps Pipeline Implementation for Tic Tac Toe Game

Screenshot 2025-03-04 at 7 16 48โ€ฏPM

image

Features

  • ๐ŸŽฎ Fully functional Tic Tac Toe game
  • ๐Ÿ“Š Score tracking for X, O, and draws
  • ๐Ÿ“œ Game history with timestamps
  • ๐Ÿ† Highlights winning combinations
  • ๐Ÿ”„ Reset game and statistics
  • ๐Ÿ“ฑ Responsive design for all devices

Technologies Used

  • React 18
  • TypeScript
  • Tailwind CSS
  • Lucide React for icons

Project Structure

src/
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ Board.tsx       # Game board component
โ”‚   โ”œโ”€โ”€ Square.tsx      # Individual square component
โ”‚   โ”œโ”€โ”€ ScoreBoard.tsx  # Score tracking component
โ”‚   โ””โ”€โ”€ GameHistory.tsx # Game history component
โ”œโ”€โ”€ utils/
โ”‚   โ””โ”€โ”€ gameLogic.ts    # Game logic utilities
โ”œโ”€โ”€ App.tsx             # Main application component
โ””โ”€โ”€ main.tsx           # Entry point

Game Logic

The game implements the following rules:

  1. X goes first, followed by O
  2. The first player to get 3 of their marks in a row (horizontally, vertically, or diagonally) wins
  3. If all 9 squares are filled and no player has 3 marks in a row, the game is a draw
  4. Winning combinations are highlighted
  5. Game statistics are tracked and displayed

Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/devsecops-demo.git
    cd devsecops-demo
  2. Install dependencies:

    npm install
    # or
    yarn
  3. Start the development server:

    npm run dev
    # or
    yarn dev
  4. Open your browser and navigate to http://localhost:5173

Building for Production

To create a production build:

npm run build
# or
yarn build

The build artifacts will be stored in the dist/ directory.

About

DevSecOps Implementation on a demo tiktactoe application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 87.7%
  • JavaScript 6.3%
  • Dockerfile 3.3%
  • HTML 2.3%
  • CSS 0.4%