Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor snake game to be cross-platform compatible #1

Merged
merged 1 commit into from
Jun 30, 2024
Merged

Conversation

FreshMess
Copy link
Owner

  • Replaced platform-specific header <windows.h> with cross-platform alternatives.
  • Updated console output functions to be compatible with Linux terminal.
  • Introduced sleep_ms function using std::this_thread::sleep_for for cross-platform delay.
  • Adjusted build configuration to use system default compiler (g++).

This refactor ensures the snake game now runs on both Windows and Linux environments without platform-specific dependencies.

Fixes: #1 - fix auto snake game

- Replaced platform-specific header <windows.h> with cross-platform alternatives.
- Updated console output functions to be compatible with Linux terminal.
- Introduced sleep_ms function using std::this_thread::sleep_for for cross-platform delay.
- Adjusted build configuration to use system default compiler (g++).

This refactor ensures the snake game now runs on both Windows and Linux environments without platform-specific dependencies.

Fixes: #1 - fix auto snake game
@FreshMess FreshMess merged commit 785ac70 into master Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant