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
21 lines
456 B
C++
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;
|
|
}
|
|
};
|