Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Go Game

DZone's Guide to

Go Game

·
Free Resource
Algun juego que alguna ves realice... llamado go, pero que ya no recuerdo.


#include 
  
   
#include 
   
    
#include 
    
     


int menu(){

    int select=0;
    do{
        printf("Menu:\n");
        printf("1. Score\n");
        printf("2. Jugar\n");
        printf("3. Salir\n");
        printf("Entre la opcion:\n");
        scanf("%i",&select);
    }while(!(select>0 && select<4));
  
    return select;    
}

void mostrar_score(int puntaje){
     //Si puntaje <0 entonces no agrega jugador
     //Sino puede agregarlo
}

void jugada_maquina(int **tablero, int f, int c){
	 int i,j;
	 do{
	 	 i=rand()%f;
	 	 j=rand()%c;
	 } while (!tablero[i][j]==0);
	 tablero[i][j]=2;	 
}

void mostrar_tablero(int **tablero,int f, int c){
	 int i,j;
	 for (i=0;i
     
      0)
					   if (tablero[i-1][j]==1)
					   	  tablero[i-1][j]=3,cambio=1;
					if (i+1
      
       0)
					   if (tablero[i][j-1]==1)
					   	  tablero[i][j-1]=3,cambio=1;
					if (i+1
       
        0)
					   if (tablero[i-1][j]==0)
					   	  tablero[i][j]=3,cambio=1;
					if (i+1
        
         0)
					   if (tablero[i][j-1]==0)
					   	  tablero[i][j]=3,cambio=1;
					if (i+1
         
          0)
					   if (tablero[i-1][j]==2)
					   	  tablero[i-1][j]=4,cambio=1;
					if (i+1
          
           0)
					   if (tablero[i][j-1]==2)
					   	  tablero[i][j-1]=4,cambio=1;
					if (i+1
           
            0)
					   if (tablero[i-1][j]==0)
					   	  tablero[i][j]=4,cambio=1;
					if (i+1
            
             0)
					   if (tablero[i][j-1]==0)
					   	  tablero[i][j]=4,cambio=1;
					if (i+1
             
              =0 && ni
              
               =0 && nj
               
              
             
            
           
          
         
        
       
      
     
    
   
  
Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}