private static void drawGoban(Goban goban) { ConsoleColor defaultColor = System.Console.BackgroundColor; System.Console.BackgroundColor = ConsoleColor.Gray; int height = goban.GetHeight(); int width = goban.GetWidth(); for (int h = 1; h <= height; h++) { writeAt(0, h, " "); writeAt(width + 1, h, " "); } for (int w = 1; w <= width; w++) { writeAt(w, 0, " "); writeAt(w, height + 1, " "); } System.Console.BackgroundColor = defaultColor; writeAt(4, 4, "*"); writeAt(4, 16, "*"); writeAt(16, 4, "*"); writeAt(16, 16, "*"); writeAt(10, 10, "*"); }
public void StartGame(int size) { GetGame().RulesBase = new GoRulesBase(size); Player firstPlayer = new Player(RulesBase, 1); Player secondPlayer = new Player(RulesBase, 2); Goban goGame = new Goban((GoRulesBase)GetGame().RulesBase); GetGame().MainFrame.AddGroup(goGame); GetGame().MainFrame.Update(); }
public void createHugeJson( Controller gameController, UserSettings userSettings, List <string> listHistory, List <Game.Cases.Case> caseDico, Goban goban ) { List <int> listCaseX = new List <int>(); List <int> listCaseY = new List <int>(); List <uint> listCaseUsedAtRound = new List <uint>(); List <bool> listCaseUsed = new List <bool>(); foreach (Game.Cases.Case newCase in caseDico) { listCaseX.Add(newCase.Position.X); listCaseY.Add(newCase.Position.Y); listCaseUsedAtRound.Add(newCase.UsedAtRound); listCaseUsed.Add(newCase.IsUsed); } hugeJson = new HugeJson( userSettings.GobanSize, gameController.Round, userSettings.MaxTimeForPlayer, gameController.PlayingNow, gameController.GamePaused, gameController.GameStarted, listHistory, goban.AllGoban, listCaseX, listCaseY, listCaseUsedAtRound, listCaseUsed, gameController.Player1.Name, gameController.Player2.Name, gameController.Player1.Color, gameController.Player2.Color, (uint)gameController.Player1.TimerValue, (uint)gameController.Player2.TimerValue, (ushort)gameController.Player1.Score, (ushort)gameController.Player2.Score ); }