Ceriwis

Ceriwis (https://forum.ceriwis.com/forum.php)
-   Programming (https://forum.ceriwis.com/forumdisplay.php?f=63)
-   -   Share Source Code Game C++ (https://forum.ceriwis.com/showthread.php?t=574263)

Linuxmania 20th November 2011 09:00 AM

Share Source Code Game C++
 

ni game prtama yg ane bt... maklum masi newbie.... minta kritik n saran dr agan. sori klo program ane slt dimengerti...



<div style="margin:20px; margin-top:5px">
Code:

#include
#include
#include

using namespace std;

bool first;
vector square(9,0);
short last_enemy;
short turn;
string human_move,enemy_move;

void home();
void display();
bool legal(short x);
void human();
void enemy();
bool check(string move);

int main()
{
char end;
short winner;
do
{
last_enemy = 0;
human_move = "";
enemy_move = "";
end = 'a';
for (short i = 0; i < square.size() ; ++i)
square[i] = char(i+49);
home();
for (turn = 1;turn


All times are GMT +7. The time now is 09:09 PM.