mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 14:02:59 +00:00 
			
		
		
		
	fieldpattern:: matrix now based on std::array
This commit is contained in:
		| @@ -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; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue