Files
media
miscellaneous
game_theory
.notgit
source
Anon.hpp
Anon2.hpp
Doomer.hpp
Player.hpp
Profiteer.hpp
RandomPlayer.hpp
Roomer.hpp
Segv.hpp
main.cpp
.gitignore
Makefile
README.md
chad_history.txt
chad_quotes.txt
xolatile_hates.list
structure
tests
README.md
chad.h
chad.pasta
meeting.txt
chad_standard/miscellaneous/game_theory/source/Doomer.hpp
anon 47bf7b2aad --
2024-07-01 23:40:15 +02:00

21 lines
456 B
C++

#include "Player.hpp"
#include <vector>
class Doomer : public Player {
std::vector<reaction_t> results;
public:
Doomer() {
name = "Doomer";
}
void new_game() override { ; }
void push_result(reaction_t opponents_last_reaction) override {
results.push_back(opponents_last_reaction);
}
reaction_t play() override {
return results.empty() || results.back() == CONFLICT ? CONFLICT : COOPERATE;
}
};