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
/** | |
* For compiling program run: | |
* gcc -std=c99 color_output.c -o color_output.run | |
*/ | |
#include <stdio.h> | |
#define ANSI_RESET_ALL "\x1b[0m" | |
#define ANSI_COLOR_BLACK "\x1b[30m" | |
#define ANSI_COLOR_RED "\x1b[31m" |
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
colors: | |
# Default colors | |
primary: | |
background: '0x2D2A2E' | |
foreground: '0xfff1f3' | |
# Normal colors | |
normal: | |
black: '0x2c2525' | |
red: '0xfd6883' |
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
import curses | |
import asyncio | |
from random import randint | |
from typing import Callable | |
async def realmain(stdscr: Callable, x_movement: int, y_movement: int): | |
curses.noecho() | |
curses.cbreak() |