Add includes of cassert
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
|
||||
using UInt = unsigned long;
|
||||
|
||||
@@ -9,6 +10,7 @@ struct Item
|
||||
UInt value_;
|
||||
unsigned depth_;
|
||||
};
|
||||
|
||||
using Items = std::vector<Item>;
|
||||
|
||||
auto print1(Items::const_iterator begin, Items::const_iterator end, unsigned current_depth)
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
|
||||
using UInt = unsigned long;
|
||||
|
||||
@@ -9,6 +10,7 @@ struct Item
|
||||
UInt value_;
|
||||
unsigned depth_;
|
||||
};
|
||||
|
||||
using Items = std::vector<Item>;
|
||||
|
||||
auto print1(Items::const_iterator begin, Items::const_iterator end, unsigned current_depth)
|
||||
|
@@ -1,10 +1,12 @@
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
struct State
|
||||
{
|
||||
explicit State(std::string const& rules) : rules_(rules)
|
||||
explicit State(std::string const& rules)
|
||||
: rules_(rules)
|
||||
{
|
||||
assert(rules.size() == 512);
|
||||
assert(rules[0] == '.' || rules[511] == '.');
|
||||
|
@@ -1,10 +1,12 @@
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
struct State
|
||||
{
|
||||
explicit State(std::string const& rules) : rules_(rules)
|
||||
explicit State(std::string const& rules)
|
||||
: rules_(rules)
|
||||
{
|
||||
assert(rules.size() == 512);
|
||||
assert(rules[0] == '.' || rules[511] == '.');
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#include <cassert>
|
||||
#include <array>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
@@ -124,6 +125,7 @@ struct State
|
||||
get(new_scorex, scorey, new_posx, posy) += states;
|
||||
}
|
||||
}
|
||||
|
||||
void move_player2(unsigned scorex, unsigned scorey, unsigned posx, unsigned posy, unsigned amount,
|
||||
UInt states)
|
||||
{
|
||||
@@ -148,6 +150,7 @@ private:
|
||||
return data_[scorey * target_score * loop_size * loop_size + scorex * loop_size * loop_size +
|
||||
(posy - 1) * loop_size + (posx - 1)];
|
||||
}
|
||||
|
||||
auto get(unsigned scorex, unsigned scorey, unsigned posx, unsigned posy) noexcept -> UInt&
|
||||
{
|
||||
return data_[scorey * target_score * loop_size * loop_size + scorex * loop_size * loop_size +
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#include <cassert>
|
||||
#include <array>
|
||||
#include <iostream>
|
||||
#include <regex>
|
||||
|
Reference in New Issue
Block a user