Forgot the little matrix wrapper.

main
Zed A. Shaw 3 days ago
parent aadf15e439
commit c11384df59
  1. 28
      README.md
  2. 14
      matrix.hpp

@ -84,7 +84,33 @@ See? That's how Free Speech works. You don't need a LICENSE.
## 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

@ -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…
Cancel
Save