public Trame2(byte ID, ListeCaseCommunication listCase) { int i = 2; // this.tailleTrame=tailleTrame; this.ID = ID; this.pile = listCase.getArrayList(); this.typeTrame = 1; this.contenuT = new byte [(byte) (this.pile.size() * 3 + 3)]; // on récupère la taille du tab, chaque case contient 3 infos + taille // trame, type et ID this.contenuT[0] = (byte) (this.pile.size() * 3 + 3); this.contenuT[1] = this.ID; for (Case Case1 : this.pile) { this.contenuT[i] = (byte) Case1.getX(); this.contenuT[i + 1] = (byte) Case1.getY(); this.contenuT[i + 2] = Case1.getCompo(); i = i + 3; } this.contenuT[i] = (byte) this.typeTrame; }