private static void InitDots(ConnectTheDotsGameContainer gameContainer) { gameContainer.DotList = new System.Collections.Generic.Dictionary <int, DotInfo>(); for (int x = 1; x <= 8; x++) { for (int y = 1; y <= 8; y++) { DotInfo thisDot = new DotInfo(); thisDot.Row = x; thisDot.Column = y; gameContainer.DotList.Add(gameContainer.DotList.Count + 1, thisDot); } } }
private static void InitSquares(ConnectTheDotsGameContainer gameContainer) { gameContainer.SquareList = new System.Collections.Generic.Dictionary <int, SquareInfo>(); for (int x = 1; x <= 7; x++) { for (int y = 1; y <= 7; y++) { SquareInfo thisSquare = new SquareInfo(); thisSquare.Row = x; thisSquare.Column = y; thisSquare.Color = 0; //i think. gameContainer.SquareList.Add(gameContainer.SquareList.Count + 1, thisSquare); } } }
public ConnectTheDotsMainGameClass(IGamePackageResolver resolver, IEventAggregator aggregator, BasicData basic, TestOptions test, ConnectTheDotsVMData model, IMultiplayerSaveState state, IAsyncDelayer delay, CommandContainer command, ConnectTheDotsGameContainer container, GameBoardProcesses gameBoard ) : base(resolver, aggregator, basic, test, model, state, delay, command, container) { _command = command; _gameBoard = gameBoard; container.MakeMoveAsync = PrivateMoveAsync; }
private static void InitLines(ConnectTheDotsGameContainer gameContainer) { gameContainer.LineList = new System.Collections.Generic.Dictionary <int, LineInfo>(); LineInfo thisLine; for (int x = 1; x <= 8; x++) { for (int y = 1; y <= 7; y++) { thisLine = new LineInfo(); thisLine.Horizontal = true; thisLine.Row = x; thisLine.Column = y; thisLine.DotRow1 = x; thisLine.DotColumn1 = y; thisLine.DotRow2 = x; thisLine.DotColumn2 = y + 1; thisLine.Index = gameContainer.LineList.Count + 1; gameContainer.LineList.Add(thisLine.Index, thisLine); } if (x != 8) { for (int y = 1; y <= 8; y++) { thisLine = new LineInfo(); thisLine.Horizontal = false; thisLine.Row = x; thisLine.Column = y; thisLine.DotRow1 = x; thisLine.DotColumn1 = y; thisLine.DotRow2 = x + 1; thisLine.DotColumn2 = y; thisLine.Index = gameContainer.LineList.Count + 1; gameContainer.LineList.Add(thisLine.Index, thisLine); } } } }
public GameBoardProcesses(ConnectTheDotsGameContainer gameContainer) { _gameContainer = gameContainer; }
internal static void InitBoard(ConnectTheDotsGameContainer gameContainer) { InitDots(gameContainer); InitSquares(gameContainer); InitLines(gameContainer); }
public GameBoardGraphicsCP(ConnectTheDotsGameContainer gameContainer) : base(gameContainer.Resolver) { _gameContainer = gameContainer; }