コード例 #1
0
 @Override
 protected void init() {
   super.init();
   if (red_position == null) red_position = new BlockPosition();
   if (green_position == null) green_position = new BlockPosition();
   if (mid_position == null) mid_position = new BlockPosition();
   if (way_green_position == null) way_green_position = new BlockPosition();
   if (way_red_position == null) way_red_position = new BlockPosition();
   if (red_links == null) red_links = new ArrayList<String>();
   if (green_links == null) green_links = new ArrayList<String>();
   if (player == null) player = "";
 }
コード例 #2
0
 @Override
 protected void toCSVInternal(ArrayList aCols) {
   super.toCSVInternal(aCols);
   aCols.add(red_position.x);
   aCols.add(red_position.y);
   aCols.add(red_position.z);
   aCols.add(green_position.x);
   aCols.add(green_position.y);
   aCols.add(green_position.z);
   aCols.add(mid_position.x);
   aCols.add(mid_position.y);
   aCols.add(mid_position.z);
   aCols.add(way_red_position.x);
   aCols.add(way_red_position.y);
   aCols.add(way_red_position.z);
   aCols.add(way_green_position.x);
   aCols.add(way_green_position.y);
   aCols.add(way_green_position.z);
   aCols.add(arrayToKeys(red_links));
   aCols.add(arrayToKeys(green_links));
   aCols.add(player);
   aCols.add(swapRedToGreen);
   aCols.add(swapGreenToRed);
 }
コード例 #3
0
 @Override
 protected void fromCSVInternal(DBRecordCSVArray aCols) {
   super.fromCSVInternal(aCols);
   red_position.x = aCols.popInt();
   red_position.y = aCols.popInt();
   red_position.z = aCols.popInt();
   green_position.x = aCols.popInt();
   green_position.y = aCols.popInt();
   green_position.z = aCols.popInt();
   mid_position.x = aCols.popInt();
   mid_position.y = aCols.popInt();
   mid_position.z = aCols.popInt();
   way_red_position.x = aCols.popInt();
   way_red_position.y = aCols.popInt();
   way_red_position.z = aCols.popInt();
   way_green_position.x = aCols.popInt();
   way_green_position.y = aCols.popInt();
   way_green_position.z = aCols.popInt();
   aCols.popKeys(red_links);
   aCols.popKeys(green_links);
   player = aCols.pop();
   swapRedToGreen = Boolean.parseBoolean(aCols.pop());
   swapGreenToRed = Boolean.parseBoolean(aCols.pop());
 }