Forgot the little matrix wrapper.
This commit is contained in:
parent
aadf15e439
commit
c11384df59
2 changed files with 41 additions and 1 deletions
28
README.md
28
README.md
|
@ -84,7 +84,33 @@ See? That's how Free Speech works. You don't need a LICENSE.
|
||||||
|
|
||||||
## Build Instructions
|
## Build Instructions
|
||||||
|
|
||||||
Coming soon, but I do know it builds on OSX and Linux. I primarily work on Windows.
|
Pre-requisites:
|
||||||
|
|
||||||
|
* Meson -- which need Python
|
||||||
|
* C++ Compiler -- Tested with Clang and G++
|
||||||
|
* GNU make -- For the convenience Makefile
|
||||||
|
|
||||||
|
Windows instructions
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git clone https://git.learnjsthehardway.com/learn-code-the-hard-way/roguish.git
|
||||||
|
|
||||||
|
cd roguish
|
||||||
|
# ignore the errors the first time
|
||||||
|
./scripts/reset_build.ps1
|
||||||
|
|
||||||
|
# first compile takes a while
|
||||||
|
make
|
||||||
|
|
||||||
|
# will play a sound and open windows
|
||||||
|
make test
|
||||||
|
|
||||||
|
# this copies the binary so you can run it
|
||||||
|
make run
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## OSX Build Notes
|
## OSX Build Notes
|
||||||
|
|
||||||
|
|
14
matrix.hpp
Normal file
14
matrix.hpp
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#pragma once
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
typedef std::vector<int> MatrixRow;
|
||||||
|
typedef std::vector<MatrixRow> Matrix;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Just a quick thing to reset a matrix to a value.
|
||||||
|
*/
|
||||||
|
inline void matrix_assign(Matrix &out, int new_value) {
|
||||||
|
for(auto &row : out) {
|
||||||
|
row.assign(row.size(), new_value);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue