You are on page 1of 1

#pragma once

#include <iostream>
#include "Avion.h"

class Nube {
private:
int x, y, dx;
int alto, ancho;
int color;
public:
Nube(int _x, int _y, int _dx, int _color) : x(_x), y(_y), dx(_dx),
color(_color), alto(2), ancho(12) {}
~Nube() {}

void dibujar() {
Console::ForegroundColor = (ConsoleColor)color;
Console::SetCursorPosition(x, y + 0); cout << R"( __ _ )" <<
endl;
Console::SetCursorPosition(x, y + 1); cout << R"( _( )_( )_ )" <<
endl;
Console::SetCursorPosition(x, y + 2); cout << R"((_ _ _))" <<
endl;
Console::SetCursorPosition(x, y + 3); cout << R"( (_) (__) )" <<
endl;
}

void borrar() {
Console::SetCursorPosition(x, y + 0); cout << R"( )" <<
endl;
Console::SetCursorPosition(x, y + 1); cout << R"( )" <<
endl;
Console::SetCursorPosition(x, y + 2); cout << R"( )" <<
endl;
Console::SetCursorPosition(x, y + 3); cout << R"( )" <<
endl;
}

void mover() {
if (x + dx < 0 || x + dx + ancho >= ANCHO) {
dx *= -1; }
x += dx;
}

};

You might also like