mirror of
https://github.com/wahyd4/zombie.git
synced 2026-08-09 04:35:54 +10:00
975 B
975 B
Zombie
How to run application
docker-compose run app
Or if you have Go v1.13 installed locally, then run
go run cmd/main.go
How to run tests
docker-compose run app go test ./... -cover
Where to start to read the code
Please read the code from the entry point cmd/main.go
How to application works
- Load input to initialise the application, it will set up the
grid,zombie,creaturesandcommands - Make the zombie to start moving, as well as the transformed zombies.
- Print out the result.
Assumptions
- All the input data is valid
Highlights
- Used
TableDrivenTests - Used
interfaceandmapto model thecommandpart to avoidif elsechecks - Built a
First-In-First-OutstructurenextZombieinapplicationto represent the next zombie to run. - Had
docker composebuilt in, you don't need to have Go installed locally. One command to bring up the whole application.