public void InitiateGame() { m_Board = new BoardLine[m_UserGuessesAmount + 1]; m_Board[0] = new BoardLine(k_GuessArraySize, (char)eBoardPadding.SecretCoding); for (int i = 1; i < m_Board.Length; i++) { m_Board[i] = new BoardLine(k_GuessArraySize, (char)eBoardPadding.EmptySpace); } createGameGoalValues(); }
private void insertGuessToBoard(int i_BoardIndex, string i_UserGuess) { BoardLine lineToInsert = m_Logic.Board[i_BoardIndex]; int jumpsBetweenLetters = k_WordDelimiter.Length + 1; int j = 0; // split guess by word delimiter and insert to board for (int i = 0; i < i_UserGuess.Length; i += jumpsBetweenLetters) { lineToInsert.UserGuess[j++] = i_UserGuess[i]; } // set exisiing values in BoardLine m_Logic.SetExistingValuesInGuess(i_BoardIndex); }