My implementation for a Code Battle.