Skip to content

Latest commit

 

History

History

power-of-thor1

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Power of Thor - Episode 1

"Power of Thor - Episode 1" is a beginner-level coding challenge available on the CodinGame platform. In this challenge, the player takes on the role of Thor, the god of thunder, who is stranded on a rectangular grid of cells and needs to reach a lightning bolt located in a specific cell.

The player has access to four pieces of information: Thor's current position (x,y), the position of the lightning bolt (lightX, lightY), the number of remaining turns (turns), and Thor's remaining energy level.

The objective is to write a program that outputs a sequence of movements for Thor to reach the lightning bolt while avoiding obstacles such as walls or gaps in the grid. Thor can move in four directions: North (up), South (down), East (right), and West (left). Each movement costs one unit of energy, and Thor starts with a certain amount of energy that can be depleted if he moves too much.

The challenge consists of writing a program that takes as input the current position of Thor, the position of the lightning bolt, and the remaining number of turns and energy level, and outputs the direction in which Thor should move to get closer to the lightning bolt.

The challenge is designed to help players learn and practice programming skills such as parsing input, making decisions based on the current state of the game, and generating output. It is a fun and engaging way to improve programming skills while solving a challenging and entertaining puzzle.