This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kandinsky import * | |
from random import * | |
from time import * | |
while True: | |
fill_rect(randint(0, 275), randint(0, 200), randint(0, 50), randint(0, 50), (randint(0, 255), randint(0, 255), randint(0, 255))) | |
sleep(.2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kandinsky import * | |
for y in range (225): | |
fill_rect(0, y, 320, 200 - y, (0, 0, y)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Find where to break lines | |
unsigned int spaceSearch(const char *string, const unsigned int start) { | |
for (int k = start; k >= 0; k--) { | |
if (string[k] == ' ') { | |
return k + 1; | |
} | |
} | |
return start; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <keypadc.h> | |
#include <time.h> | |
int main(void) { | |
// Ensure no key is pressed when the program is first opened | |
while(kb_AnyKey()); | |
bool keyPressed = false; | |
// Keep track of an offset for timer stuff | |
clock_t clockOffset = clock(); |