added material coding and its arrays. game finished