Multilingual Chinese Chess Game with many options icon

Multilingual Chinese Chess Game with many options

Go to Website
Hot or Not
Multilingual Chinese Chess Game with many options

Description

Board

The Chinese Chess -聽Xiangqi board is a rectangular grid of 9 x 10 lines. The board is divided by a "river" that separates the two sides of the board. Each player's pieces start on their side of the board and cannot cross the river unless they are a certain type of piece.

Rules

The chess pieces are moved according to the following rules:

  1. General (or King): The most important piece on the board, the general can move one space orthogonally (up, down, left, or right) within the "palace," a 3 x 3 area in the center of the player's side of the board.
  2. Advisors (or Guards): These pieces also start in the palace and can move one space diagonally within the palace.
  3. Elephants: These pieces can move two spaces diagonally and are restricted to their own side of the board. They are blocked by the river and cannot cross it.
  4. Chariots: These pieces can move any number of spaces orthogonally. They cannot jump over other pieces.
  5. Horses: These pieces can move two spaces orthogonally and then one space diagonally. They can jump over other pieces.
  6. Cannons: These pieces move like chariots but can only capture by jumping over another piece.
  7. Soldiers (or Pawns): These pieces move one space forward, and can move two spaces forward on their first move. Once they cross the river, they can also move one space sideways.

Features

Options

There are 4 options: Play alone, Play with AI, Play in room, and Set up the board

  1. Play alone: Players press on the button "Play alone" on the front page and practice alone.
  2. Train with computer: Players play directly on the front page. There are 5 levels: Newbie, Easy, Normal, Hard, and Hardest.
  3. Play in room: Players press on the button "Play now", host a new room with random Room code, and create a password for you and your friend, also capable of Inviting friend to play by sending the link. Players can also access the page "Rooms" to enter a hosted room. Players can choose Red Side or Black Side, Red moves first.
  4. Set up the puzzle: Players press on the link "Puzzle". In this option, players can arrange the chess pieces and press "Capture the puzzle" to challenge friends.

Requirements

Server Requirements:

  • PHP >= 8.0
  • Ctype PHP Extension
  • cURL PHP Extension
  • DOM PHP Extension
  • Fileinfo PHP Extension
  • Filter PHP Extension
  • Hash PHP Extension
  • Mbstring PHP Extension
  • OpenSSL PHP Extension
  • PCRE PHP Extension
  • PDO PHP Extension
  • Session PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension

Instructions

  1. Installation

    After you've downloaded the product and extracted the contents from the ZIP package, you can start the installation process.
    1. Preparing the database

      • Create a new MySQL database.
      • Create a new MySQL username and password.
      • With a text editor, open the .env and edit the values of APP_NAME, APP_URL, DB_DATABASE, DB_USERNAME, DB_PASSWORD with your own information.
      • If you have SSH access, run
        php artisan key:generate
        
        
        and
        php artisan migrate
        
        
        in the command line.
      • If not, import the Database.sql file from the MySQL folder into your MySQL database.
    2. Setting up the DB and uploading the files

      • If you don't have the SSH access, upload the contents of the source code folder on the location where you want the product to be installed at.
      • if you have the SSH access, just upload the Source.zip file and run
        unzip Source.zip
        
        
        It will extract the content of the source code into your root folder.
  2. Web Server Configuration

    1. In Apache or LiteSpeed or OpenLiteSpeed Server
      • In Root Folder
        <ifmodule mod_rewrite.c="">
        # That was ONLY to protect you from 500 errors
        # if your server did not have mod_rewrite enabled
        RewriteEngine On
        # RewriteBase /
        # NOT needed unless you're using mod_alias to redirect
        RewriteCond %{REQUEST_URI} !/public
        RewriteRule ^(.*)$ public/$1 
        # Direct all requests to /public folder
        </ifmodule>
        
        
      • In "public" folder
        <ifmodule mod_rewrite.c="">
            <ifmodule mod_negotiation.c="">
                Options -MultiViews -Indexes
            </ifmodule>
            RewriteEngine On
            # Handle Authorization Header
            RewriteCond %{HTTP:Authorization} .
            RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
            # Redirect Trailing Slashes If Not A Folder...
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteCond %{REQUEST_URI} (.+)/$
            RewriteRule ^ %1 [L,R=301]
            # Send Requests To Front Controller...
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^ index.php 
        </ifmodule>
        
        
    2. In Nginx Server
      server {
        listen 80;
        server_name example.com;
        root /srv/example.com/public;
        add_header X-Frame-Options "SAMEORIGIN";
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Content-Type-Options "nosniff";
        index index.php;
        charset utf-8;
        location / {
          try_files $uri $uri/ /index.php?$query_string;
        }
        location = /favicon.ico { access_log off; log_not_found off; }
        location = /robots.txt  { access_log off; log_not_found off; }
        error_page 404 /index.php;
        location ~ .php$ {
          fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
          fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
          include fastcgi_params;
        }
        location ~ /.(?!well-known).* {
          deny all;
        }
      }
      
      
Authortungpham
CategoryScripts & Code / PHP Scripts / Games
Price$30
Extended License$90
Likes3
First ReleaseMar 6, 2023
Last UpdateMar 6, 2023
DatabaseMySQL 5.x
Files included.php, .css, .html, .sql, JavaScript .js
Software versionPHP 8.0
Html/css frameworkBootstrap
Software frameworkLaravel
Javascript frameworkjQuery

External listing. code.market does not sell this product and does not process payment for it. Pricing, payment, delivery, licensing, refunds, and support are handled by the third-party merchant on its own website. We may earn an affiliate commission from a referral. Details.