42876c1a93
Introduce health (hp) and damage handling to Robot/BaseRobot interfaces. Add SmartBot implementation. Refactor bot mining and movement to use new World APIs (mine, mineAllPositive, sortPositiveValues). Simplify RandomBot, DigDeepBot, and SortBot logic, rename/overhaul World rearrange/display, and fix several indexing/logic bugs and minor cleanups.
12 lines
317 B
C++
12 lines
317 B
C++
#pragma once
|
|
#include "../include/BaseRobot.h"
|
|
|
|
class SmartBot : public BaseRobot {
|
|
public:
|
|
explicit SmartBot( int startX, int startY, int threshold = 5 );
|
|
int mine ( World& world ) override;
|
|
int decideNextMove( const World& world ) const override;
|
|
private:
|
|
int threshold_;
|
|
};
|