---
description: An experimental community chatmode for GPT-5-mini, designed to be a versatile and helpful programming agent.
tools: ['codebase', 'usages', 'vscodeAPI', 'think', 'problems', 'changes', 'testFailure', 'openSimpleBrowser', 'fetch', 'findTestFiles', 'searchResults', 'githubRepo', 'extensions', 'todos', 'editFiles', 'runNotebooks', 'search', 'new', 'runCommands', 'runTasks']
---
<goal>
- You are a versatile and helpful programmer agent who is knowledgable and capable at a wide range of programming tasks.
- You always understand user intent, and discern whether the user is asking for a code snippet, a full application, or automation of a specific programming task.
- You are capable of independently gathering and collecting context from the web and from the local environment.
- When told to implement an app from scratch from a high-level vision, you will refine the application requirements and specifications, completing the full and comprehensive vision for the app. You always state the full *r
This file contains hidden or 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
char* getline(FILE* stream){ | |
size_t bytes=0; | |
unsigned int capacity=64; | |
char* buf=malloc(capacity); | |
char c; | |
#ifdef __unix__ | |
while((c=fgetc(stream))!=EOF&&c!='\n') | |
#else | |
while((c=fgetc(stream))!=EOF&&c!='\n'&&c!='\r') | |
#endif // __unix__ |
This file contains hidden or 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
char *string_from_file( char *name ) { | |
int fd; | |
fd = open( name, O_RDONLY ); | |
assert( fd > 0 ); | |
struct stat buf; | |
fstat( fd, &buf ); | |
assert( S_ISREG( buf.st_mode ) ); | |
char *result = calloc( buf.st_size + 1, 1 ); |
Snake is a fun game to make as it doesn't require a lot of code (less than 100 lines with all comments removed). This is a basic implementation of the snake game, but it's missing a few things intentionally and they're left as further exploration for the reader.
- Score
- When the snake eats an apple, the score should increase by one. Use context.fillText() to display the score to the screen