/// <summary> /// Create a new hero. /// </summary> /// <param name="memSize"> Hero's Memory size. </param> /// <param name="Score"> Hero's score. </param> public Hero(int memSize, int Score) { m_iScore = 0; m_iMemorySize = memSize; m_iScore = Score; PopulateMemoryCellMatrix(); m_mcCurrentMemoryCell = Memory[0, 0]; }
/// <summary> /// Puts MemoryCells inside the matrix of MemoryCell the hero has of his environment. /// </summary> public void PopulateMemoryCellMatrix() { m_lmcMemory = new MemoryCell[m_iMemorySize, m_iMemorySize]; for (int i = 0; i < m_iMemorySize; i++) { for (int j = 0; j < m_iMemorySize; j++) { Memory[i, j] = new MemoryCell(); Memory[i, j].LineIndex = i; Memory[i, j].ColumnIndex = j; } } }