and i did it
it is a game where the player has to give the orders of what to do in the city (build houses, etc...)
and the game ends when the conditions of the people (if they are happy, like when i build roads their condition goes up ) is = 15
but my problem is that when i tell to build something ( like houses or roads or sewers) their conditions dont go up and their money dont go down
and yes i put money% = money% - 200 (for example)
heres the code
Code: Select all
CLS
COLOR 12
PRINT "GOVERNADOR"
COLOR 15
PRINT "FEITO POR JO?O PIRES"
PRINT
PRINT "O OBJECTIVO DESTE JOGO ? CRIAR UMA CIDADE"
PRINT "COM TODAS AS CONDI??ES PARA O BEM-ESTAR"
PRINT "DAS POPULA??ES."
PRINT
INPUT "INSERE EM [C] PARA CONTINUAR: ", press$
IF press$ = "c" THEN
CLS
COLOR 12
PRINT "GOVERNADOR"
COLOR 15
PRINT "FEITO POR JO?O PIRES"
PRINT
PRINT "COMANDOS DE JOGO"
PRINT "esgotos = CRIAR SISTEMA DE ESGOTOS"
PRINT "electricidade = CRIAR POSTES DE ELECTRICIDADE"
PRINT "gas = CRIAR CONDUTAS DE G?S"
PRINT "estradas = CRIAR ESTRADAS"
PRINT "casas = CRIAR CASAS"
PRINT "empresas = CRIAR EMPRESAS"
PRINT
INPUT "[C]ONTINUAR"; continue$
END IF
IF continue$ = "c" THEN
CLS
DO
conditions% = 0
money% = 2000
PRINT "CONDI??ES POPULA??O: "; conditions%
PRINT "DINHEIRO: "; money%
fazer: INPUT "O QUE FAZER: ", do$
IF do$ = "esgotos" THEN
money% = money% - 200
conditions% = conditions% + 2
PRINT "A POPULA??O AGORA TEM ESGOTOS."
END IF
IF do$ = "electricidade" THEN
IF conditions% >= 2 THEN
money% = money% - 200
conditions% = conditions% + 1
PRINT "A POPULA??O AGORA TEM ELECTRICIDADE."
ELSE
PRINT "PRIMEIRO TENS DE CONSTRUIR ESGOTOS."
GOTO fazer
END IF
END IF
IF do$ = "gas" THEN
IF conditions% >= 3 THEN
money% = money% - 100
conditions% = conditions% + 1
PRINT "A POPULA??O AGORA TEM G?S."
ELSE
PRINT "H? COISAS QUE TENS DE CRIAR PRIMEIRO."
GOTO fazer
END IF
END IF
IF do$ = "estradas" THEN
IF conditions% >= 4 THEN
money% = money% - 400
conditions% = conditions% + 3
PRINT "A POPULA??O AGORA TEM ESTRADAS."
ELSE
PRINT "H? COISAS QUE TENS DE CRIAR PRIMEIRO."
GOTO fazer
END IF
END IF
IF do$ = "casas" THEN
IF conditions% >= 7 THEN
money% = money% - 600
conditions% = conditions% + 5
PRINT "A POPULA??O AGORA TEM CASAS."
ELSE
PRINT "H? COISAS QUE TENS DE CRIAR PRIMEIRO."
GOTO fazer
END IF
END IF
IF do$ = "empresas" THEN
IF conditions% >= 12 THEN
money% = money% - 350
conditions% = conditions% + 3
PRINT "A POPULA??O AGORA TEM EMPRESAS."
ELSE
PRINT "H? COISAS QUE TENS DE FAZER PRIMEIRO."
GOTO fazer
END IF
END IF
IF do$ = "sair" THEN
END
END IF
LOOP
IF money% < 1 THEN
PRINT "FOSTE ? FAL?NCIA!"
PRINT "O JOGO ACABOU!"
END
END IF
IF conditions% = 15 THEN
PRINT "CONSEGUISTE DAR ? POPULA??O AS CONDI??ES!"
PRINT "GANHASTE!"
END
END IF
END IF
are in portuguese because im portuguese