class Strategy::CautiousCarol

Overview

Strategy that chases the closest available food from the board with caution against head-to-head collisions. When a potentially dangerous move is in the way it analyzes the other valid moves available and picks the one with the most open area of the board to avoid enclosed spaces.

Defined in:

strategy/cautious_carol.cr

Instance Method Summary

Instance methods inherited from class Strategy::Base

move move

Constructor methods inherited from class Strategy::Base

new(context : BattleSnake::Context) new

Instance Method Detail

def move #
Description copied from class Strategy::Base

Returns the move (direction) to chose based on the @context


[View source]