diff options
author | Pacien TRAN-GIRARD | 2016-02-22 16:06:48 +0100 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2016-02-22 16:06:48 +0100 |
commit | c9d137bcbe20550ec98736b8ffed8aaab756989c (patch) | |
tree | c62188617e155b57adaa2590abf5beef412e928b | |
parent | 9809f6e226d593c1e717b8d6ab576d986da9cbe3 (diff) | |
download | xblast-c9d137bcbe20550ec98736b8ffed8aaab756989c.tar.gz |
Fix row major index calculation
-rw-r--r-- | src/ch/epfl/xblast/Cell.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ch/epfl/xblast/Cell.java b/src/ch/epfl/xblast/Cell.java index d5b15e7..c5fbad8 100644 --- a/src/ch/epfl/xblast/Cell.java +++ b/src/ch/epfl/xblast/Cell.java | |||
@@ -146,7 +146,7 @@ public final class Cell { | |||
146 | * @return the index of the Cell | 146 | * @return the index of the Cell |
147 | */ | 147 | */ |
148 | public int rowMajorIndex() { | 148 | public int rowMajorIndex() { |
149 | return this.x * ROWS + this.y; | 149 | return this.y * COLUMNS + this.x; |
150 | } | 150 | } |
151 | 151 | ||
152 | /** | 152 | /** |