Coverage Report

Created: 2026-11-14 03:38

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/nix/store/rr0r40cw3mzzbz0sxrnkvnrjpzb82wpc-j27cjzgh5nmq3y8k6hwa6zpi3qgcjia8-source/src/controllers/angrydiscardobot.h
Line
Count
Source
1
#pragma once
2
#include <cstddef>
3
#include <memory>
4
#include <string>
5
#include <vector>
6
7
#include "controllers/playercontroller.h"
8
#include "types/event.h"
9
#include "types/piecetype.h"
10
#include "types/winds.h"
11
12
namespace mahjong {
13
14
// Always Calls (Angry) and Always Discards the tile it draws
15
class AngryDiscardoBot : public PlayerController {
16
 public:
17
0
  static std::unique_ptr<PlayerController> New() {
18
0
    return std::make_unique<AngryDiscardoBot>();
19
0
  }
20
21
0
  void GameStart(int _playerID) override {}
22
  void RoundStart(std::vector<Piece> hand, Wind /*seatWind*/,
23
0
                  Wind /*prevalentWind*/) override {
24
0
    hand_ = hand;
25
0
    lastEvent_.type = Event::kDiscard;
26
0
  }
27
28
  void ReceiveEvent(Event e) override;
29
  Event RetrieveDecision() override;
30
31
0
  std::string Name() override { return "AngryDiscardoBot"; };
32
33
 private:
34
  std::vector<Piece> hand_;
35
  size_t n_ = 0;
36
  Event lastEvent_;
37
};
38
39
}  // namespace mahjong