public void TryGenerateImage() { var terrainCase = new TerrainCase(0, 0, 0); var wallCase = new WallCase(0, 0); var board = new Board(10, 10); var mapdrawer = new MapDrawer(board); var line = new List <Case>() { terrainCase, wallCase, terrainCase, wallCase, terrainCase, wallCase, terrainCase, wallCase, terrainCase }; var boardLine = new BoardLine(line); for (int i = 0; i < board.Width; i++) { board.BoardContent.Add(boardLine); boardLine.LineContent.Reverse(); } var rand = new Random(); int r; mapdrawer.DrawMap(board); }
private List <BoardLine> GetModifiedLines() { List <BoardLine> modifiedLines = new List <BoardLine>(); for (int x = 0; x < _verticalLines.Count; x++) { BoardLine currentLine = _verticalLines[x]; if (currentLine.NewLettersCount > 0) { modifiedLines.Add(currentLine); } } for (int x = 0; x < _horizontalLines.Count; x++) { BoardLine currentLine = _horizontalLines[x]; if (currentLine.NewLettersCount > 0) { modifiedLines.Add(currentLine); } } return(modifiedLines); }
private List <BoardLine> GetInvalidWordLines() { List <BoardLine> invalidWordLines = new List <BoardLine>(); for (int x = 0; x < _verticalLines.Count; x++) { BoardLine currentLine = _verticalLines[x]; if (currentLine.HasInvalidWord) { invalidWordLines.Add(currentLine); } } for (int x = 0; x < _horizontalLines.Count; x++) { BoardLine currentLine = _horizontalLines[x]; if (currentLine.HasInvalidWord) { invalidWordLines.Add(currentLine); } } return(invalidWordLines); }
private void insertGuessToBoard(int i_BoardIndex, string i_UserGuess) { BoardLine lineToInsert = r_GameLogic.Board[i_BoardIndex]; for (int i = 0; i < i_UserGuess.Length; i++) { lineToInsert.UserGuess[i] = i_UserGuess[i]; } r_GameLogic.SetExistingValuesInGuess(i_BoardIndex); }
private List <BoardLine> GetUsedLines(List <BoardLine> modifiedLines) { List <BoardLine> usedLines = new List <BoardLine>(); for (int x = 0; x < modifiedLines.Count; x++) { BoardLine currentLine = modifiedLines[x]; if (currentLine.NewLettersCount > 1) { usedLines.Add(currentLine); } } return(usedLines); }