Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

License

NotificationsYou must be signed in to change notification settings

marcgardent/igoenchi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The project is fork of IGoEnchi

IGoEnchi is an Internet Go Server (IGS) client and SGF editorfor Windows Mobile. For more information please visit IGoEnchihomepage athttp://sourceforge.net/projects/igoenchi/

Purpose of fork

  • Migrate to github
  • Compile under Visual Studio with last DotNet Framework
  • Separate of concern and make reusable lib and publish NuGet package.
    • IGOEnchi.GoGameSgf
      • IGOEnchi.SmartGameLib
      • IGOEnchi.GoGameLogic

IGOEnchi.GoGameSgf Library

Library to read/write gogames with Sgf-files. It's use IGOEnchi.SmartGameLib, IGOEnchi.GoGameLogic.

Usage

Open gogame from SGF

    private static GoGame OpenFile(string path)    {        using (var stream = File.OpenRead(path))        {            var excepted = SgfReader.LoadFromStream(stream);            return SgfCompiler.Compile(excepted);        }    }

Save gogame to SGF

private static void SaveAsSgf(GoGame gogame, string path)    {        var builder = new GoSgfBuilder(gogame);        var sgf = builder.ToSGFTree();        using (var file = File.CreateText(path))        {            var writer = new SgfWriter(file, true);            writer.WriteSgfTree(sgf);        }    }

IGOEnchi.SmartGameLib Library

Independant library to read/write Sgf-fileshttps://en.wikipedia.org/wiki/Smart_Game_Format

Usage

Read SGF

SGFTree excepted = SgfReader.LoadFromStream(stream);

See also

  • For Advanded usage to consume SGFTree seeIGOEnchi.GoGameSgf.SgfCompiler Class

Create and Write SGF with SgfBuilder

//Build    var b = new SgfBuilder();    b.p("b", "M1")        .Fork(x => x.p("b", "M2").Next().p("b", "M3"))        .Fork(x => x.p("c", "M2").Next().p("c", "M3"));var sgf = b.ToSGFTree();//Save    using (var file = File.CreateText(path))    {var writer = new SgfWriter(file, true);        writer.WriteSgfTree(sgf);}

See also

IGOEnchi.GoGameLogic Library

Independant library to manipulate gogame.

    private static void throughGogameSample(GoGame game)    {        game.ToStart();        do        {            var move =game.CurrentNode as GoMoveNode;                            if (move!=null)            {                //your code            }        }while ( game.ToNextMove());}

To construct gogame seeIGOEnchi.GoGameSgf.SgfCompiler Class

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp