Terminal-based Snake game in GO
make run
make test
make format
- cli
made to take user input of height and width. - pkg
created a base backbone of the game with a dynamic 2d array(height and width taken from user).
- cli
- clear.go
added code to clear the cmd to render the sake.
- clear.go
- pkg
- board.go
added func to move the sake. - game-state.go
made a loop so the position of snake will be updated and also used CallClear() from cli/clear.go to clear the cmd. - render.go
rendered the snake. - snake.go
set up movement parameters for the snake.
- board.go
- pkg
- game-state.go
added keyboard events. - render.go
added additional info. - snake.go
derectionalised movements of snake and collusion detection. - keyboard.go
to get real-time keyboard inputs with This Library. - food.go
added food logic.
- game-state.go
- vendor
added vendor directory - Makefile
created makefile with run and format