abh - HTMLify profile

abh's Profile Picture

abh

509 Files

102923 Views

Latest files of /abh/learning/c/BPPL/Phase-3/tic-tac-toe

Tic Tac Toe (C lang) abh/learning/c/BPPL/Phase-3/tic-tac-toe/main.c
21 Views
0 Comments
#include <stdio.h>
#include <string.h>
#include "ttt.h"
#include "ui.h"

int main() {
char p1n[32], p2n[32], p1m, p2m;
int turn, players;
ui.c abh/learning/c/BPPL/Phase-3/tic-tac-toe/ui.c
18 Views
0 Comments
#include <ncurses.h>
#include <locale.h>
#include <string.h>
#include "ttt.h"
#include "ui.h"

enum {
WHITE,
ui.h abh/learning/c/BPPL/Phase-3/tic-tac-toe/ui.h
17 Views
0 Comments
#ifndef UI_H
#define UI_H

#include "ttt.h"

void draw_mark(int pos, char mark);

void draw_game(TTT *);
ttt.c abh/learning/c/BPPL/Phase-3/tic-tac-toe/ttt.c
20 Views
0 Comments
#include "ttt.h"
#include <string.h>
#include <stdlib.h>
#include <time.h>


TTT *TTT_init(const char* player1, const char* player2, const char player1_symbol, const char player2_symbol, int turn) {
static TTT game;
ttt.h abh/learning/c/BPPL/Phase-3/tic-tac-toe/ttt.h
15 Views
0 Comments

#ifndef TTT_H
#define TTT_H

#include <stdbool.h>

typedef struct {
char state[9];