Level 1
21
Level completed!

NEXT

Tip: Look for zombies along the way. Use your "senses" wisely

Game over!

TRY AGAIN
Sweet! You have completed all 3 levels!

More to come soon...
SUBMIT
HELP
1
2
3
4
5
6
7
8
9
10
11
class Player {
playTurn(warrior) {
//this method gets called for every turn
//uncomment next line and call appropriate method
//warrior.????()
}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Help

Turns

The game is played in turns. At every turn, the playTurn method is executed to determine what action the warrior will take. It's your responsibility to define the behavior using this function.

Actions

An action is something that the warrior can do. You can perform one action per turn
MethodDescription
warrior.walk()Walks in the direction the warrior is currently facing.
warrior.attack()Attack one step in the direction that you're facing. An attack deals 3 points of damage.
warrior.rest()Gain back 3 points of health back, but do nothing more.

Senses

A sense is something which gathers information about the floor. You can perform senses as often as you want per turn to gather information about your surroundings and to aid you in choosing the proper action.
MethodDescription
warrior.health()Return an integer representing your current health.
warrior.feel().isEnemy()Determine if an enemy unit is facing the warrior
warrior.feel().isEmpty()If true, this means that nothing (except maybe stairs) is at this location and you can walk here.
CONSOLE
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
READY