Skip to content

Latest commit

 

History

History
32 lines (19 loc) · 931 Bytes

README.md

File metadata and controls

32 lines (19 loc) · 931 Bytes

Power-of-Thor---Episode-1

Your program must allow Thor to reach the light of power.

Rules

Thor moves on a map which is 40 wide by 18 high. Note that the coordinates (X and Y) start at the top left! This means the most top left cell has the coordinates "X=0,Y=0" and the most bottom right one has the coordinates "X=39,Y=17".

Once the program starts you are given:

the variable lightX: the X position of the light of power that Thor must reach. the variable lightY: the Y position of the light of power that Thor must reach. the variable initialTX: the starting X position of Thor. the variable initialTY: the starting Y position of Thor.

At the end of the game turn, you must output the direction in which you want Thor to go among:

N (North)

NE (North-East)

E (East)

SE (South-East)

S (South)

SW (South-West)

W (West)

NW (North-West)

Each movement makes Thor move by 1 cell in the chosen direction.