Ceriwis  

Go Back   Ceriwis > HOBI > Komputer & Teknologi > Programming

Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman.

Reply
 
Thread Tools
  #1  
Old 20th November 2011
Linuxmania Linuxmania is offline
Ceriwiser
 
Join Date: Nov 2011
Posts: 392
Rep Power: 14
Linuxmania mempunyai hidup yang Normal
Default 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...




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

Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


 


All times are GMT +7. The time now is 03:02 AM.


no new posts