Skip to content

andre-fajar-n/Treasure-Hunt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Treasure-Hunt

Description

Given layout grid like this

# # # # # # # #
# . . . . . . #
# . # # # . . #
# . . . # . # #
# X # . . . . #
# # # # # # # #

# represents an obstacle.
. represents a clear path.
X represents the player’s starting position.

A treasure is hidden within one of the clear path points. From the starting position, the user must navigate in a specific order:

  • Up/North A step(s), then
  • Right/East B step(s), then
  • Down/South C step(s).

The program show list of probable coordinate points where the treasure might be located, navigation to reach the treasure, and the grid with the probable treasure locations marked with $ symbol.

Example:

Up/North 1 step(s)
Right/East 2 step(s)
Down/South 1 step(s)
# # # # # # # #
# . . . . . . #
# . # # # . . #
# . . . # . # #
# X # $ . . . #
# # # # # # # #

Setup package

go mod vendor

How to run program

go run main.go

About

Skill test for position Backend Engineer in Evermos

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages