-
```
[3/4] Building CXX object CMakeFiles/othello_runner.dir/othello_runner.cpp.o
../othello_runner.cpp: In function ‘int main(int, char**)’:
../othello_runner.cpp:71:56: warning: array subscript has t…
usagi updated
8 years ago
-
The current server implementation uses strings as move to send to the clients.
We need to decide wether we format this string as [X,Y] or as row*max_rows+col.
-
> BoardString must be /^[.BW]{64}$/.
```
usagi updated
8 years ago
-
https://github.com/sapporocpp/othello-battler/blob/master/othello_runner.cpp#L76
プロセスたちあげよりも、共有ライブラリ or DLLがよいかと。
dlopen or LoadLibraryで関数直接呼び出せばいい。
Boost.DLL強く推奨。
```
$ ls
AI1.so AI2.so ...
$ ./oth…
-
例えばここ
https://github.com/sapporocpp/othello-battler/blob/master/othello_runner.cpp#L47
これはモダンC++としては `std::stoi` だけでよいと思われる。
ref.: http://cpprefjp.github.io/reference/string/stoi.html
usagi updated
8 years ago
-
@omegaphoenix, @alphaz99, @nancyywen
It seems like there are some constants that we are picking somewhat arbitrarily like the timeout time, the time between routing table updates, and the routing tab…
-
https://github.com/sapporocpp/othello-battler/blob/master/othello_lib.hpp#L11
``` c++
const int SIZE = 8; // 盤面の大きさ
```
↓こんな感じ?
``` c++
constexpr auto size = 8ull;
```
usagi updated
8 years ago
-
https://github.com/sapporocpp/othello-battler/blob/master/othello_runner.cpp#L57
```
std::cin.get();
```
あるいは
```
std::string line;
std::getline(std::cin, line);
```
で代用できる。
-
https://github.com/sapporocpp/othello-battler/blob/1.0.0/othello_runner.cpp#L110
MSVC++, mingw に関わらずwindowsでは std::chrono::high_resolution_clock の精度も分解能も低いのでHPET等を期待するなら
https://github.com/usagi/usa…
usagi updated
8 years ago
-
https://github.com/sapporocpp/othello-battler/blob/master/othello_lib.hpp#L13
``` c++
class InvalidArgumentException{
```
↓こんな感じ?
``` c++
class InvalidArgumentException: public std::invalid_arg…
usagi updated
8 years ago