From 1cea1d46e0b51e0f7df1ea2070bd5286e549fabc Mon Sep 17 00:00:00 2001 From: Jerome Bedier Date: Fri, 18 Apr 2025 15:19:59 +0200 Subject: [PATCH] width and height method working - can be changed also --- src/backend/Board.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/backend/Board.java b/src/backend/Board.java index bc5d165..c2370c2 100644 --- a/src/backend/Board.java +++ b/src/backend/Board.java @@ -4,19 +4,23 @@ import java.util.ArrayList; public class Board { private Piece[][] board; + private int width; + private int height; public Board(int colNum, int lineNum) { - this.board = new Piece[8][8]; // 8x8 chess board + this.width = colNum; // col move x + this.height = lineNum; // line mov in y + this.board = new Piece[width][height]; // 8x8 chess board } public int getWidth() { - //TODO - return 0; + width = 8; // 8 for the moment can be changed + return width; } public int getHeight() { - //TODO - return 0; + height = 8; // 8 for the moment can be changed + return height; } public int getTurnNumber() {