Skip to content

Instantly share code, notes, and snippets.

View Bahaaio's full-sized avatar
👾

Bahaa Mohamed Bahaaio

👾
View GitHub Profile
@Bahaaio
Bahaaio / snakeGame.cpp
Created August 20, 2024 04:40
Console C++ classic snake game
#include <bits/stdc++.h>
#include <thread> // to have a second thread for input
using namespace std;
#ifdef _WIN32
#include <conio.h>
int getCharInput() {
@Bahaaio
Bahaaio / TicTacToe.cpp
Last active November 17, 2023 21:13
Tic Tac Toe game (system("cls") function will only work on windows)
#include <iostream>
#include <windows.h>
using namespace std;
char table[3][3]={'1','2','3','4','5','6','7','8','9'};
char player='X';
void draw()
{