arbrown / pao Goto Github PK
View Code? Open in Web Editor NEWA Banqi Game Server
Home Page: http://pao.drewbrown.me/
License: MIT License
A Banqi Game Server
Home Page: http://pao.drewbrown.me/
License: MIT License
I should at least be able to say goodbye!
See boltdb, perhaps.
Create a cannon character favicon in appropriate sizes/resolutions:
https://www.emergeinteractive.com/insights/detail/the-essentials-of-favicons/
https://upload.wikimedia.org/wikipedia/commons/2/2e/Xiangqi_Cannon_%28Trad%29.svg
Add them to the main page html and serve them from a separate directory.
Currently, the first player to join the game always starts the game. It should be random or just default to making @perlmonger42 go first in every game.
When a board is displayed (not the lobby)
Perhaps mouseOver on chat messages should display the sent (received) time for chat messages.
Users should be able to join a game in kibitz mode (default if a game already has two players) and watch the game in progress.
The chat box needs to scroll and should auto-scroll to the bottom of the chat messages when a new message is added. The text area should receive focus.
The new, larger, boneyard piece size causes them to overlap the text-chat window. Adjust the chatbox location so they no longer overlap.
Add spreadsheet-style headers on each row and column of the displayed game board.
Refactor game state code into a separate package so it can be shared with AIs written in Go
AIs should be specified in the config and contain a websocket endpoint Pao can connect to to play a game.
Currently, the frontend sends the coordinates as A0-H3, when according to the documentation it should be A1-H4. There is a hack in the server code to account for this error that should be fixed.
Open up a websocket to lobby viewers and stream the list of games to them.
Make sure to close the lobby websocket when the user navigates away! :)
Create a reference AI that is capable of communicating over websocket with Pao
This may or may not be true, but in this particular game, he actually won. Fix the code so it reports the correct winner.
When you create a new game, automatically create a discord channel. When a player or spectator joins the game, prompt to switch the user to the discord channel.
The game should detect when one player has pieces remaining, but cannot make a valid move.
This should be careful not to declare a loser when a trapped cannon still has a jump available to it.
I want to be able to click surrender to give up on a game.
The game should show the dead pieces in a list below or to the side of the board. They should be grouped by color, and ordered by kill order in the game, or piece strength (king to pawn, then cannon.) Perhaps clicking the dead pieces section could toggle.
Second round of improvements to the graveyard. Some topics for discussion/consideration:
Allow spectators to suggest moves by double clicking a cell. The moves should show up in chat with the name of the people that suggested it.
Make it clear when an opponent has made a move by highlighting that move on the board.
For example:
Sometimes (maybe always?) the game sticks around in the global game map after it has finished. It shouldn't.
After reading issue #20, I think it'd be nice to be able to mute the opposing player :).
I think it's trying to figure out if red or black won before it knows who is red or black. This is a big deal and should be addressed.
The game will send victory messages before displaying the last move.
Maybe add a nice screenshot or two. ๐
In-browser conversion of JSX to js is slow, and likely leading to bugs. The server should compile JSX on its own and preferably cache copies when compiled.
Now that live pieces are technically visible in the boneyard, we should highlight the most recently killed one with the "last-killed" highlight instead of always highlighting the first.
In this picture, a second red pawn has just been taken, but the same pawn that was killed the turn prior retains its "last-killed" highlighting instead of the most recent one to turn dark/dead.
It's pedantic and unimportant, I know...
Come up with a game state score/weight for each player, and make the resign button grow if it gets beyond some threshold.
I've been thinking about redoing the dead pieces.
Here are some use cases, things I've sometimes tried to compute, or think others might want
My conclusions
Ideas
The message at the top of the screen currently reads either "Your Turn" or "Opponent's Turn". Change it to use the player's name instead.
It probably belongs in different packages. Only the main file (pao.go) should be in the root folder, with the rest in packages (or just one other package...)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.