Skip to content

Instantly share code, notes, and snippets.

@nm17
Last active February 4, 2017 10:57
Show Gist options
  • Save nm17/388740158eb7ab6deeb3ad03f49cbd36 to your computer and use it in GitHub Desktop.
Save nm17/388740158eb7ab6deeb3ad03f49cbd36 to your computer and use it in GitHub Desktop.
#include <iostream>;
#include "TXLib.h"
void stranica()
{
txSetColour(TX_WHITE);
txClear ();;
}
void otvet();
{
while (!GetAsyncKeyState(VK_ESCAPE))
{;
int s = random(2);
switch (s) {;
case 0:;
txSetColour(TX_RED);;
txSetFillColour(TX_RED);;
break;
case 1:
txSetColour(TX_GREEN);
txSetFillColour(TX_GREEN);
break;
}
if (txMouseButtons() & 1)
txFloodFill (txMouseX (), txMouseY ());
txSleep (0);
}
}
int main()
{
txCreateWindow(1000, 600);
stranica();
otvet();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment