Daftar Isi:
  • Snake Game is simple game, but in this project, Snake Game has modification where the snake can spend the way as much as possible and the same way can be acrossed maximal one more again. Snake and wall will holdered in every place in board by user. This project using tree to moving of snake while finding the longest path. Implementation in tree, this project has four children, it will search from up, right, down, and then left. All the tree will created also doing searching the longest path of way that can be across by snake. Tree as Data Structure and DFS algorithm can solve this project. Because the pursuit of DFS in here is to find the longest path that can be acrossed by snake . From the position of snake, doing process of search, if not found wall and not out size of board, snake will move to spend the way as much as possible while not blump wall and not acrossing the same way more of twice. If the longest path found, the game will finish.