adamreisnz / nggo Goto Github PK
View Code? Open in Web Editor NEWAn Angular.JS library for reading, parsing, displaying, editing and replaying Go game records.
License: Other
An Angular.JS library for reading, parsing, displaying, editing and replaying Go game records.
License: Other
When using the editor and placing some stones where in the existing game tree moves will be played, the game will issue an invalid move error when the invalid move occurs.
This is fine, however, when going back to the first node afterwards, all the setup stones have vanished.
Create a new animation layer and let it have an interval of redrawing 30 times per second, whenever there is an animation object in place. Add callbacks for when the animation is finished (for example, add stone to the actual static stones layer).
After downloading the whole project as a .zip from GitHub, the .html files in demo folder do not run in 1.2.2 (angular missing?). It was OK in 1.1.
Besides, there are two ngGo.js files (one in root, one in release folder).
Ref #30
When a setup node is processed, it is added to the path and the move count is incremented. This makes the current move number inaccurate, as setup nodes get counted as moves.
This affects the showMoveNumbers functionality as well.
Currently, when placing markup labels on the board, they are incremented (e.g. A, B, C... 1, 2, 3, ...) ad infinitum.
Instead, use a map of valid characters to traverse, and keep track of which ones have been used. Then, if one or more of them are removed, the current label should be set to draw the first available one.
Hi Adam, I tried to get ngGo working in a AngularJS MVC structure and I get the Error: undefined is not an object (evaluating 'attr.split') at line lib/ngGo/ngGo.js:231:31. I use the $route service and and render a template with the board tag in index.html with
Scrolling the browser window may trigger moving to next/previous moves. Is there an option to disable move navigation triggered by mouseWheel?
When hovering over a valid move position and an auto move is made, the stone then disappears upon the players turn, and doesn't re-appear again unless the mouse is moved outside of the grid square.
The game scorer should automatically determine likely territories and handle seki or ko situations.
When changing player color in real time the board doesn't update correctly.
To allow import/conversion of GIB files.
The multi canvas solution from WGo is not acceptable, because it doesn't work well with angular directives and creates unnecessary overhead. Find a way to properly draw/clear shadows without the need for multiple canvases (currently, they overlap, leaving ugly straight lines when cleared).
Hello :)
I created a simple angularjs project to use your library.
I am using an example in the wiki section.
https://github.com/adamreisnz/ngGo/wiki/Quickstart
I have 'index.html'. I don't need more than a page.
https://github.com/cosmir17/go-ai-client-angularjs/blob/master/app/index.html
For some reason, nothing is loaded on the page.
ng-go library seems running inside 'app.js' as you can see a console log on the screenshot.
https://github.com/cosmir17/go-ai-client-angularjs/blob/master/app/app.js
However, I am not seeing anything on my browser.
Can I know what mistake I made?
Thank you,
cosmir17
See: https://github.com/jquery/jquery-mousewheel/blob/master/jquery.mousewheel.js
Use it to create a cross browser mousewheel event listener for angular/ngGo so that we don't have to rely on jquery-mousewheel.
After a game is loaded, how can I
Thanks
Support non-square boards by allowing the JGF size attribute to be an object with width and height defined, e.g.: {width: 19, height: 9}
For SGF, the convention SZ[19:9] is recommended, which is also used by OGS.
In Game.prototype.fromData
, file type is determined by the first char in data. For example, the first char of the bundled test.jgf
file is not a '{'
.
Hello,
There are many examples(modes) on the wiki page but I couldn't find one that suits my need.
Player.on("click", function(event, mouseEvent) {
console.log("Clicked on grid coordinates:", event.x, event.y);
});
This just prints the coordinates on the console. How can I play a game?
$scope.Game = Player.game;
My current project is :
https://github.com/cosmir17/go-ai-client-angularjs/blob/master/app/index.html
https://github.com/cosmir17/go-ai-client-angularjs/blob/master/app/app.js
Please let me know if I have to change something in my code as well not only your guidance.
Thank you,
cosmir17
The convention of saving coordinates as for example "cb" was good when it was saving space, but now it's just a hassle, not to mention limited to 26x26 boards.
Let's instead change the JGF specs to have moves be:
move: {x: 3, y: 2, color: "B"},
And all other coordinates also use x and y properties.
Add a switchable render mode for the board via the attribute render="svg" or render="canvas".
Currently, the board margin (with or without coordinates) is a fixed ratio of the board width/height. However, this needs to be a factor of the cell size.
Problem is that the cellsize depends on the margin...
All player events have been stashed together in the playerEventHandlers service for now, but they need to be separated and organized in a more efficient manner to allow easy extension and overwriting of functionality.
Possible suggestion: create player mode (e.g. play mode, setup mode, score mode.) services which embed various event handlers and board tools (e.g. move tool, stone tool, markup tool) within themselves.
Add a switchable render mode for the board via the attribute render="svg" or render="canvas".
Currently, you can surround stones in setup mode without them being captured/removed from the board.
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.