Kniffel/domain/StarwarsSheet.java

53 lines
1.3 KiB
Java

package domain;
import domain.sheets.*;
public class StarwarsSheet extends Sheet{
//? Additional upper half
Sevens sevens;
Eights eights;
//? Additional lower half
StarWarsDay starWarsDay;
R2D2 r2D2;
public StarwarsSheet(){
super();
this.sevens = new Sevens();
super.unusedRows.add(this.sevens.toString());
this.eights = new Eights();
super.unusedRows.add(this.eights.toString());
this.starWarsDay = new StarWarsDay();
super.unusedRows.add(this.starWarsDay.toString());
this.r2D2 = new R2D2();
super.unusedRows.add(this.r2D2.toString());
}
public void writeStarwarsCategory(Category categoryToWrite, boolean crossing){
switch (categoryToWrite.toString()){
case "Sevens":
sevens = (Sevens) categoryToWrite;
break;
case "Eights":
eights = (Eights) categoryToWrite;
break;
case "StarWarsDay":
starWarsDay = (StarWarsDay) categoryToWrite;
break;
case "R2D2":
r2D2 = (R2D2) categoryToWrite;
break;
default:
super.writeCategory(categoryToWrite, crossing);
break;
}
}
}