introduce the data structure and algorithms for game