Log in Register Dashboard Temp Share Shortlinks Frames API

abh - HTMLify profile

abh's Profile Picture

abh

523 Files

134661 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
58 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
53 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
51 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
56 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
61 Views
0 Comments

#ifndef TTT_H
#define TTT_H

#include <stdbool.h>

typedef struct {
char state[9];