Multilingual Chinese Chess Game with many optionsMultilingual Chinese Chess Game with many options
Chinese Chess - Xiangqi - Cờ tướng game with AI - 5 levels of difficulty, multiplayer, puzzle set up and solutions.Multilingual Chinese Chess Game with many options
Chinese Chess - Xiangqi - Cờ tướng game with AI - 5 levels of difficulty, multiplayer, puzzle set...Overview
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:
- 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.
- Advisors (or Guards): These pieces also start in the palace and can move one space diagonally within the palace.
- 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.
- Chariots: These pieces can move any number of spaces orthogonally. They cannot jump over other pieces.
- Horses: These pieces can move two spaces orthogonally and then one space diagonally. They can jump over other pieces.
- Cannons: These pieces move like chariots but can only capture by jumping over another piece.
- 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
- Play alone: Players press on the button "Play alone" on the front page and practice alone.
- Train with computer: Players play directly on the front page. There are 5 levels: Newbie, Easy, Normal, Hard, and Hardest.
- 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.
- 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
-
Installation
After you've downloaded the product and extracted the contents from the ZIP package, you can start the installation process.-
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
andphp artisan migrate
in the command line. - If not, import the Database.sql file from the MySQL folder into your MySQL database.
-
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.
-
Web Server Configuration
- 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 [L] # 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 [L] </ifmodule>
- In Root Folder
- 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; } }
- In Apache or LiteSpeed or OpenLiteSpeed Server
Other items by this author
PHP Script Installation Service
Don't worry about the installation of your script! Have your PHP Script installed for you.
|
$39 | Buy now |
Category | Scripts & Code / PHP Scripts / Games |
First release | 6 March 2023 |
Last update | 6 March 2023 |
HTML/CSS Framework | Bootstrap |
Software version | PHP 8.0 |
Files included | .php, .css, .html, .sql, Javascript .js |
Database | MySQL 5.x |
Software framework | Laravel |
JavaScript Framework | jQuery |
Tags | php, game, bootstrap, jquery, MySQL, password, scss, ai, room, level, laravel, chess, minimax, xiangqi |