mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
fieldpattern:: matrix now based on std::array
This commit is contained in:
parent
80b6b536fc
commit
b12e1a71dd
@ -37,11 +37,7 @@ EX bool isprime(int n) {
|
|||||||
#if HDR
|
#if HDR
|
||||||
#define MWDIM (prod ? 3 : WDIM+1)
|
#define MWDIM (prod ? 3 : WDIM+1)
|
||||||
|
|
||||||
struct matrix {
|
struct matrix : array<array<int, MAXMDIM>, MAXMDIM> {
|
||||||
int a[MAXMDIM][MAXMDIM];
|
|
||||||
int* operator [] (int k) { return a[k]; }
|
|
||||||
const int* operator [] (int k) const { return a[k]; }
|
|
||||||
|
|
||||||
bool operator == (const matrix& B) const {
|
bool operator == (const matrix& B) const {
|
||||||
for(int i=0; i<MWDIM; i++) for(int j=0; j<MWDIM; j++)
|
for(int i=0; i<MWDIM; i++) for(int j=0; j<MWDIM; j++)
|
||||||
if(self[i][j] != B[i][j]) return false;
|
if(self[i][j] != B[i][j]) return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user