Git Product home page Git Product logo

nggo's People

Contributors

cookwu avatar larsg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nggo's Issues

Setup stones disappear

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.

Animation layer for object animations

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).

Demos do not run in 1.2.2

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).

Setup nodes are counted as move nodes

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.

Remember markup labels on board

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.

Error: undefined is not an object (evaluating 'attr.split')

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

Solve mode hover stone issue

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.

Find alternative method to handle shadow drawing/clearing

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).

I need a help. It's not running for me. I am using an example in the Wiki section.

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.
screenshot 2019-02-23 at 16 12 46

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

Is there an option to show move number on top of stones?

move_numbers

... similar to the about diagram. It'll be great if ngGo will support:

  Player.showMoveNumbers(); // show number for all stones
  Player.showMoveNumbers(fromMove, toMove); // for a range of moves
  Player.showMoveNumbersFromLastComment(); // from previous comment to current move

How to get comment of a move?

After a game is loaded, how can I

  • goto the first upcoming move which contains a comment, and
  • get the comment text of a move?

Thanks

Support for non square boards

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.

I need a help. I want FE & BE to engage in the same game play

Hello,

img_3681

There are many examples(modes) on the wiki page but I couldn't find one that suits my need.

  1. How can I have player 1 (user input)
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?

  1. How can I set up player 2 (backend), I can work on the http part.
  2. How can I make player 1 & 2 to play together?
    The following line seems setting up a game but I want to have a game for two players.
    $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

Save coordinates as x, y pairs in JGF

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 SVG render mode

Add a switchable render mode for the board via the attribute render="svg" or render="canvas".

Better margin sizes

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...

Improved event handling

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 SVG render mode

Add a switchable render mode for the board via the attribute render="svg" or render="canvas".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.