From c9d137bcbe20550ec98736b8ffed8aaab756989c Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Mon, 22 Feb 2016 16:06:48 +0100 Subject: Fix row major index calculation --- src/ch/epfl/xblast/Cell.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ch') 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 { * @return the index of the Cell */ public int rowMajorIndex() { - return this.x * ROWS + this.y; + return this.y * COLUMNS + this.x; } /** -- cgit v1.2.3