ttt.c File Reference

#include <stdlib.h>
#include <time.h>
#include <stdio.h>

Include dependency graph for ttt.c:

Go to the source code of this file.

Data Structures

struct  MOVE

Defines

#define printw   printf

Functions

 _PROTOTYPE (int main,(void))
 _PROTOTYPE (int stateval,(int board[], int whosemove))
 _PROTOTYPE (MOVE alphabeta,(int board[], int whosemove, int alpha, int beta))
 _PROTOTYPE (void draw,(int board[]))
 _PROTOTYPE (int endofgame,(int board[]))
int stateval (board, int whosemove)
MOVE alphabeta (board, int whosemove, int alpha, int beta)
void draw (board)
void getmove (board)
int endofgame (board)
int randommove ()
int main ()


Define Documentation

#define printw   printf
 

Definition at line 27 of file ttt.c.

Referenced by draw(), endofgame(), getmove(), main(), PrintMove(), WriteCommand(), WriteLetters(), and WriteLine().


Function Documentation

_PROTOTYPE int  endofgame,
(int board[]) 
 

_PROTOTYPE void  draw,
(int board[]) 
 

_PROTOTYPE MOVE  alphabeta,
(int board[], int whosemove, int alpha, int beta) 
 

_PROTOTYPE int  stateval,
(int board[], int whosemove) 
 

_PROTOTYPE int  main,
(void) 
 

MOVE alphabeta board  ,
int  whosemove,
int  alpha,
int  beta
 

Definition at line 87 of file ttt.c.

References i, result, stateval(), and MOVE::value.

Referenced by main().

void draw board   ) 
 

Definition at line 127 of file ttt.c.

References i, j, move, out, and printw.

int endofgame board   ) 
 

Definition at line 192 of file ttt.c.

References count, eval(), move, printw, and stateval().

Referenced by main().

void getmove board   ) 
 

Definition at line 165 of file ttt.c.

References draw, move, printw, refresh, and scanf().

Referenced by main().

int main void   ) 
 

Definition at line 233 of file ttt.c.

References alphabeta(), clear, draw, endofgame(), endwin(), getmove(), i, initscr(), move, MOVE::path, printw, randommove(), refresh, and scanf().

int randommove  ) 
 

Definition at line 224 of file ttt.c.

References abs, i, and time.

Referenced by main().

int stateval board  ,
int  whosemove
 

Definition at line 52 of file ttt.c.

References i, j, and win.

Referenced by alphabeta(), and endofgame().


Generated on Fri Apr 14 23:07:48 2006 for minix by  doxygen 1.4.6