- for(int n = 0; n < _nb_polygons; n++) if(_polygons[n]) _polygons[n]->draw(window);
- for(int n = 0; n < _nb_polygons; n++) if(_polygons[n]) _polygons[n]->draw_contours(window);
+ for(int n = 0; n < _nb_polygons; n++) {
+ if(_polygons[n]) {
+ _polygons[n]->draw(window);
+ }
+ }
+
+ for(int n = 0; n < _nb_polygons; n++) {
+ if(_polygons[n]) {
+ _polygons[n]->draw_contours(window);
+ }
+ }
+}
+#endif
+
+void Universe::draw(Canvas *canvas) {
+ for(int n = 0; n < _nb_polygons; n++) {
+ if(_polygons[n]) {
+ _polygons[n]->draw(canvas);
+ }
+ }
+
+ for(int n = 0; n < _nb_polygons; n++) {
+ if(_polygons[n]) {
+ _polygons[n]->draw_contours(canvas);
+ }
+ }