jackbenn / gengo Goto Github PK
View Code? Open in Web Editor NEWA program for managing a game of a generalized version of go
A program for managing a game of a generalized version of go
For performance reasons, and to learn javascript.
There should be a way to observe existing games in the web app, and maybe load old ones.
The index page should be an intro, with a brief description, and leading to other pages on starting a new game, joining an existing one, and observing.
Based on #17 add an option to choose the overlap in the startup screen. For this issue, the player gets a three hard-coded choices and these are passed to the server. In the future the player can specify them.
The server sometimes crashes. I'm not sure why. Update with details from next crash (restarted 6/6/21)
This would be easiest with an alert box but maybe better with a separate area in which it's printed.
Probably use the logging library
I updated brython version and changed it to download it from the cloud in commit b44144f
One of those caused it to no longer list games (I've confirmed it works at the prior commit).
Although playing on two computers is generally more useful, there should be a way to run it on a single computer. This should generally be as if was before I got both boards working. This would be easier to demonstrate, easier to play with someone in the same room, and easier to generate boards for documentation.
This might be from the new page in the web app, but it might be hidden from that, and instead have a single command that will start the web server and game server and open a window to the correct location.
Right not the lines are between the squares, not at the intersections, and the stones are squares, rather than circles.
This will involve a change of how data is sent from the server.
Save game state on completion; eventually load game from db
The join page should only list games that haven't been joined, and that have an active connection on the other end (not sure how to check this yet). Ideally it should also list the rules of the game in table form. It might also list games in progress separately.
Options in how to do it:
The workflow currently is players alternate moves. Instead of moving, a player can undo an opponent's last move.
This should be changed to one where after a player moves they have to click a "commit" button to show it to the opponent and let them play. If they click the "cancel" button instead it will be undone and the player can move elsewhere.
So the flow is:
Client: on_click,
send move to server
activate commit/cancel buttons
on_click commit/cancel:
send commit/cancel to server, deactivate buttons
on_message:
draw board, set my_move as appropriate
Server: await recv move:
make move,
send to current player, my_move=False
await commit or cancel
if commit:
send to other player, my_move=True
if cancel:
undo move, send to current player, my_move=True
The current rules say a player can't play in one's own stone's overlap. That might not be the best approach; an alternate ruleset would allow playing in the overlap of one's own stones (but not one's opponents).
This might be a better ruleset; if it were an option I could investigate.
This has a few parts:
It should send the board before the first move
Right now it's confusing if it's your turn and which side you're playing.
Require the game name to exist before starting.
Maybe also check it isn't being used, or something.
Right now we're parsing with eval which is pretty unsafe.
Based on #17, the player should be able to choose which side is black. This will be passed to the server.
There's a bug in the web app where the players switch under some undo/pass situations.
It should be fixed, but ultimately a client should know which player it is.
This should be as command-line options.
As per https://brython.info/static_doc/en/install.html we can just download brython from somewhere else. This should be faster and less confusing.
Right now people go to the same page to start and join a game, and if two happen to start a game with the same name, the first one is black.
How it should work:
One player creates a game. They enter various options including
The second player goes to the join page, where they see the games waiting to start. They can choose one to join.
Right not it's not that obvious if stones are neighbors. This would involve sending additional data from the server.
The alternative is to have the overlap regions pulled back a bit, or draw a border around a group, but those are a lot harder and require sending more data from the server.
the performances of the web app is pretty bad, so that one has to wait several seconds between clicks. It could be in the logging, or in the score counting, or just using python, or in the websockets.
The web app does not finish a game. The server should check is_done. If it is, it should display the scores (both types?), stop accepting new requests, and remove the connections from the list.
The game should allow free-move handicaps, where one player can play several moves at the beginning.
In the future, this should be in the web app as well.
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.