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:
- 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 # 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>
- 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
| Author | tungpham |
|---|---|
| Category | Scripts & Code / PHP Scripts / Games |
| Price | $30 |
| Extended License | $90 |
| Likes | 3 |
| First Release | Mar 6, 2023 |
| Last Update | Mar 6, 2023 |
| Database | MySQL 5.x |
| Files included | .php, .css, .html, .sql, JavaScript .js |
| Software version | PHP 8.0 |
| Html/css framework | Bootstrap |
| Software framework | Laravel |
| Javascript framework | jQuery |
Categories
Tags
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.
Products of the Week.
Submit馃
Free LinkedIn Likes From Real Members | LinkedInLikes
Get free LinkedIn likes on your posts from real members who react by hand. No password needed: you only share a link.
Website 路 12,847 views 路 46 clicksWebsite 路 Week 49 路 12,847 views 路 46 clicks
馃
Free Medium Claps From Real Writers | MediumPlace
Free Medium claps on your stories from verified accounts of real writers, each given by hand. No bots, no Medium password, nothing to pay. Paste a link.
Website 路 7,964 views 路 10 clicksWebsite 路 Week 49 路 7,964 views 路 10 clicks
馃
Free GitHub Stars From Real Developers | GitWow
Get free GitHub stars on your repository from real developers who star by hand. No token or password, and it's free.
Website 路 15,624 views 路 28 clicksWebsite 路 Week 49 路 15,624 views 路 28 clicks
#4
Free Substack Likes From Real Writers | StackRooms
Free Substack likes on your posts and Notes from verified accounts of real writers, given by hand. Free to ask, free to receive. Just share a link.
Website 路 7,784 views 路 2 clicksWebsite 路 Week 49 路 7,784 views 路 2 clicks
#5
Free Twitter Likes From Real People | SupaTwitter
Free Twitter likes on your tweets from verified accounts of real people, each given by hand. No bots, no Twitter password, nothing to pay. Paste a link.
Website 路 7,679 views 路 4 clicksWebsite 路 Week 49 路 7,679 views 路 4 clicks
#6
Free X Likes From Real People, Given by Hand | XFast
Free X likes on your posts from verified accounts of real people, each one given by hand. No bots, no X password, no conditions. Paste a link to start.
Website 路 7,591 views 路 0 clicksWebsite 路 Week 49 路 7,591 views 路 0 clicks