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 <stdio.h> | |
#include <stdbool.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <ctype.h> | |
void printBoard(char board[3][3]) | |
{ |
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 random | |
from time import sleep | |
import math | |
import pynput | |
from threading import * | |
from pynput.keyboard import Listener | |
from termcolor import colored | |
from os import system | |
# all of the variables here are needed to break out of while loops using pynput |
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 random | |
import curses | |
from curses import wrapper | |
from time import sleep | |
import math | |
#this class will establish and draw a board | |
class Board: | |
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 termcolor import colored, cprint | |
#this class will create a board array as well as draw input to the board | |
class Board: | |
#creates a 2d array relative to rows and columns | |
def __init__(self, rows, columns): | |
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 time | |
import random | |
board = [[' ', ' ', ' ', ' ', ' ', ' '], | |
[' ', ' ', ' ', ' ', ' ', ' '], | |
[' ', ' ', ' ', ' ', ' ', ' '], | |
[' ', ' ', ' ', ' ', ' ', ' '], | |
[' ', ' ', ' ', ' ', ' ', ' ']] | |
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 random | |
import time | |
#print board | |
board = [["-", "-", "-"], | |
["-", "-", "-"], | |
["-", "-", "-"]] | |
def print_board(): |
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 random | |
import time | |
row1 = [" ", " ", " "] | |
row2 = [" ", " ", " "] | |
row3 = [" ", " ", " "] | |
#draws the board to the screen | |
def display(row1, row2, row3): |